migrate to git
This commit is contained in:
commit
62270aa10a
|
@ -0,0 +1,31 @@
|
|||
Version 4.0.0 - 2016-05-03
|
||||
Version 3.4.0 - 2014-11-05
|
||||
|
||||
Version 3.2.1 - 2014-10-31
|
||||
* Use the sale's shop instead of user's shop to calculate the Price list for
|
||||
sale
|
||||
* Remove unnecessary fields from depends and add some necessary
|
||||
* Add Currency to shop and use it to fill the currency of sale when choose the
|
||||
shop
|
||||
* Add search value to filter current shop in Sale menu
|
||||
* Create a default shop for all users in tests
|
||||
* Update locales
|
||||
* Active sale shop
|
||||
* Allow add/remove users from shops
|
||||
|
||||
Version 3.2.0 - 2014-05-26
|
||||
* Fix DeprecationWarning: on_change argument is deprecated, use the depends
|
||||
decorator
|
||||
* Fix write method
|
||||
|
||||
Version 3.0.0 - 2013-10-25
|
||||
|
||||
Version 2.8.0 - 2013-04-26
|
||||
|
||||
Version 2.6.0 - 2012-10-08
|
||||
* Simplify module information with python configuration
|
||||
* Active Record
|
||||
* Sale shop by company
|
||||
|
||||
Version 2.4.0 - 2012-06-26
|
||||
* Initial release
|
|
@ -0,0 +1,14 @@
|
|||
Copyright (C) 2012 Zikzakmedia SL.
|
||||
|
||||
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,29 @@
|
|||
Installing trytond_sale_shop
|
||||
============================
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
* Python 2.6 or later (http://www.python.org/)
|
||||
* trytond (http://www.tryton.org/)
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Once you've downloaded and unpacked the trytond_sale_shop source release, enter the
|
||||
directory where the archive was unpacked, and run:
|
||||
|
||||
python setup.py install
|
||||
|
||||
Note that you may need administrator/root privileges for this step, as
|
||||
this command will by default attempt to install module to the Python
|
||||
site-packages directory on your system.
|
||||
|
||||
For advanced options, please refer to the easy_install and/or the distutils
|
||||
documentation:
|
||||
|
||||
http://peak.telecommunity.com/DevCenter/EasyInstall
|
||||
http://docs.python.org/inst/inst.html
|
||||
|
||||
To use without installation, extract the archive into ``trytond/modules`` with
|
||||
the directory name sale_shop.
|
|
@ -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,12 @@
|
|||
include INSTALL
|
||||
include README
|
||||
include TODO
|
||||
include CHANGELOG
|
||||
include COPYRIGHT
|
||||
include LICENSE
|
||||
include tryton.cfg
|
||||
include *.xml
|
||||
include view/*.xml
|
||||
include locale/*.po
|
||||
include doc/*
|
||||
include tests/*.rst
|
|
@ -0,0 +1,43 @@
|
|||
trytond_sale_shop
|
||||
=================
|
||||
|
||||
The sale_shop module of the Tryton application platform.
|
||||
|
||||
Installing
|
||||
----------
|
||||
|
||||
See INSTALL
|
||||
|
||||
Support
|
||||
-------
|
||||
|
||||
For more information or if you encounter any problems with this module,
|
||||
please contact the programmers at
|
||||
|
||||
Zikzakmedia
|
||||
--------------
|
||||
website: http://www.zikzakmedia.com/
|
||||
email: zikzak@zikzakmedia.com
|
||||
|
||||
If you encounter any problems with Tryton, please don't hesitate to ask
|
||||
questions on the Tryton bug tracker, mailing list, wiki or IRC channel:
|
||||
|
||||
http://bugs.tryton.org/
|
||||
http://groups.tryton.org/
|
||||
http://wiki.tryton.org/
|
||||
irc://irc.freenode.net/tryton
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
See LICENSE
|
||||
|
||||
Copyright
|
||||
---------
|
||||
|
||||
See COPYRIGHT
|
||||
|
||||
|
||||
For more information please visit the Tryton web site:
|
||||
|
||||
http://www.tryton.org/
|
|
@ -0,0 +1,31 @@
|
|||
# This file is part sale_shop module for Tryton.
|
||||
# The COPYRIGHT file at the top level of this repository contains
|
||||
# the full copyright notices and license terms.
|
||||
from trytond.pool import Pool
|
||||
import shop
|
||||
import sale
|
||||
import user
|
||||
import configuration
|
||||
import stock
|
||||
import invoice
|
||||
|
||||
|
||||
def register():
|
||||
Pool.register(
|
||||
configuration.Configuration,
|
||||
shop.SaleShop,
|
||||
shop.SaleShopResUser,
|
||||
user.User,
|
||||
sale.Sale,
|
||||
stock.ShipmentOut,
|
||||
stock.ShipmentOutReturn,
|
||||
sale.SaleBySupplierStart,
|
||||
sale.SaleLine,
|
||||
invoice.Invoice,
|
||||
module='sale_shop', type_='model')
|
||||
Pool.register(
|
||||
sale.PrintSaleBySupplier,
|
||||
module='sale_shop', type_='wizard')
|
||||
Pool.register(
|
||||
sale.SaleBySupplier,
|
||||
module='sale_shop', type_='report')
|
|
@ -0,0 +1,18 @@
|
|||
#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 PoolMeta
|
||||
|
||||
__all__ = ['Configuration']
|
||||
|
||||
|
||||
class Configuration(metaclass=PoolMeta):
|
||||
__name__ = 'sale.configuration'
|
||||
default_description = fields.Char('Default Description')
|
||||
use_description_product = fields.Boolean('Use Description Product')
|
||||
default_invoice_type = fields.Char('Default Invoice Type')
|
||||
cache_products_local = fields.Boolean('Cache Products Local')
|
||||
|
||||
@staticmethod
|
||||
def default_cache_products_local():
|
||||
return True
|
|
@ -0,0 +1,13 @@
|
|||
<?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="sale_configuration_view_form">
|
||||
<field name="model">sale.configuration</field>
|
||||
<field name="name">configuration_form</field>
|
||||
<field name="inherit" ref="sale.sale_configuration_view_form" />
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</tryton>
|
Binary file not shown.
After Width: | Height: | Size: 85 KiB |
|
@ -0,0 +1,12 @@
|
|||
==================
|
||||
Ventas por tiendas
|
||||
==================
|
||||
|
||||
Este módulo permite gestionar tiendas por usuarios:
|
||||
|
||||
* Relaciona tiendas con usuarios.
|
||||
* Busca, filtra y lista por tienda.
|
||||
|
||||
Es importante instalar este módulo antes que se realizen pedidos de
|
||||
venta. En caso contrario, deberá un técnico instalar este módulo
|
||||
y modificar unos parámetros a la base de datos.
|
|
@ -0,0 +1,60 @@
|
|||
#:before:sale/sale:section:configuracion#
|
||||
|
||||
Tiendas
|
||||
=======
|
||||
|
||||
La opción de tiendas en los pedidos de venta le permitirá establecer una organización
|
||||
de tiendas (físicas o virtuales) y usuarios por cada tienda.
|
||||
|
||||
A |menu_sale_shop| agregaremos una nueva tienda con la información:
|
||||
|
||||
* |shop_name|: Nombre de la tienda
|
||||
* |shop_users|: Usuarios que tendrán acceso a esta tienda.
|
||||
* |shop_warehouse|: Almacén principal que opera esta tienda.
|
||||
* |shop_price_list|: Tarifa de venta para esta tienda.
|
||||
* |shop_payment_term|: Plazos de pago para esta tienda.
|
||||
* |shop_sale_sequence|: Numeración que usará los pedidos de esta tienda.
|
||||
* |shop_sale_invoice_method|: Método de facturación que usará esta tienda.
|
||||
* |shop_sale_shipment_method|: Métode de envío que usará esta tienda.
|
||||
* |shop_company|: Empresa de esta tienda.
|
||||
|
||||
.. |menu_sale_shop| tryref:: sale_shop.menu_sale_shop/complete_name
|
||||
.. |shop_name| field:: sale.shop/name
|
||||
.. |shop_users| field:: sale.shop/users
|
||||
.. |shop_warehouse| field:: sale.shop/warehouse
|
||||
.. |shop_price_list| field:: sale.shop/price_list
|
||||
.. |shop_payment_term| field:: sale.shop/payment_term
|
||||
.. |shop_sale_sequence| field:: sale.shop/sale_sequence
|
||||
.. |shop_sale_invoice_method| field:: sale.shop/sale_invoice_method
|
||||
.. |shop_sale_shipment_method| field:: sale.shop/sale_shipment_method
|
||||
.. |shop_company| field:: sale.shop/company
|
||||
|
||||
Usuarios
|
||||
--------
|
||||
|
||||
A |menu_user| podrá añadir o agregar a que tiendas pueden crear
|
||||
pedidos. A parte, dispone del campo en que tienda esta activo en este momento.
|
||||
|
||||
.. |menu_user| tryref:: res.menu_user_form/complete_name
|
||||
|
||||
Preferencias
|
||||
------------
|
||||
|
||||
Los usuarios pueden cambiar de tienda mediante sus preferencias
|
||||
(Menú superior/Preferencias) y decidir en que tienda están en este momento
|
||||
creando/editando pedidos.
|
||||
|
||||
.. figure:: images/tryton-sale-shop.png
|
||||
|
||||
Configuración de tiendas en Tryton
|
||||
|
||||
Pedidos
|
||||
-------
|
||||
|
||||
En el momento de crear un pedido nuevo, este se le asigna a una tienda. Este campo
|
||||
es requerido y de solo lectura, por tanto, si un usuario no tiene acceso a ninguna
|
||||
tienda, no podrá generar pedidos, aunque tenga roles de creación de pedidos.
|
||||
|
||||
.. note:: Para crear pedidos de venta a parte de disponer de los grupos
|
||||
relacionados a ventas, el usuario deberá pertenecer a una o varias
|
||||
tiendas.
|
|
@ -0,0 +1,10 @@
|
|||
Sale Shop Module
|
||||
################
|
||||
|
||||
Sale Shop module add features:
|
||||
* Manage shops and users
|
||||
* Search, filter and list sales by shop
|
||||
|
||||
|
||||
Install this module before adding sale. If not, you need to alter sale table to
|
||||
add shop columns.
|
|
@ -0,0 +1,15 @@
|
|||
# This file is part Invoice_shop module for 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 PoolMeta
|
||||
from trytond.pyson import Eval
|
||||
|
||||
__all__ = ['Invoice']
|
||||
|
||||
|
||||
class Invoice(metaclass=PoolMeta):
|
||||
__name__ = 'account.invoice'
|
||||
shop = fields.Many2One('sale.shop', 'Shop', required=False, domain=[
|
||||
('id', 'in', Eval('context', {}).get('shops', [])),
|
||||
], depends=['number'])
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part sale_shop module for 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="invoice_view_form">
|
||||
<field name="model">account.invoice</field>
|
||||
<field name="inherit" ref="account_invoice.invoice_view_form"/>
|
||||
<field name="name">invoice_form</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</tryton>
|
|
@ -0,0 +1,215 @@
|
|||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "error:sale.sale:"
|
||||
msgid "Go to user preferences and select a shop (\"%s\")"
|
||||
msgstr "Selecciona una botiga en les seves preferencies (\"%s\")"
|
||||
|
||||
msgctxt "error:sale.sale:"
|
||||
msgid "Sale have not related a shop"
|
||||
msgstr "La comanda no està relacionada amb una botiga"
|
||||
|
||||
msgctxt "error:sale.sale:"
|
||||
msgid ""
|
||||
"There is another sale with the same number.\n"
|
||||
"The number of the sale must be unique!"
|
||||
msgstr ""
|
||||
"Hi ha una altra venda amb el mateix número.\n"
|
||||
"El número ha de ser única per botiga."
|
||||
|
||||
msgctxt "error:sale.sale:"
|
||||
msgid ""
|
||||
"You cannot edit this order because you do not have permission to edit in "
|
||||
"this shop."
|
||||
msgstr ""
|
||||
"No podeu editar aquesta comanda perque no disposeu de permisos d'edició en "
|
||||
"aquesta botiga."
|
||||
|
||||
msgctxt "field:res.user,shop:"
|
||||
msgid "Shop"
|
||||
msgstr "Botiga"
|
||||
|
||||
msgctxt "field:res.user,shops:"
|
||||
msgid "Shops"
|
||||
msgstr "Botigues"
|
||||
|
||||
msgctxt "field:sale.sale,shop:"
|
||||
msgid "Shop"
|
||||
msgstr "Botiga"
|
||||
|
||||
msgctxt "field:sale.sale,shop_address:"
|
||||
msgid "Shop Address"
|
||||
msgstr "Adreça botiga"
|
||||
|
||||
msgctxt "field:sale.shop,active:"
|
||||
msgid "Active"
|
||||
msgstr "Actiu"
|
||||
|
||||
msgctxt "field:sale.shop,address:"
|
||||
msgid "Address"
|
||||
msgstr "Adreça"
|
||||
|
||||
msgctxt "field:sale.shop,company:"
|
||||
msgid "Company"
|
||||
msgstr "Empresa"
|
||||
|
||||
msgctxt "field:sale.shop,company_party:"
|
||||
msgid "Company Party"
|
||||
msgstr "Tercer de l'empresa"
|
||||
|
||||
msgctxt "field:sale.shop,create_date:"
|
||||
msgid "Create Date"
|
||||
msgstr "Data creació"
|
||||
|
||||
msgctxt "field:sale.shop,create_uid:"
|
||||
msgid "Create User"
|
||||
msgstr "Usuari creació"
|
||||
|
||||
msgctxt "field:sale.shop,currency:"
|
||||
msgid "Currency"
|
||||
msgstr "Moneda"
|
||||
|
||||
msgctxt "field:sale.shop,id:"
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
msgctxt "field:sale.shop,name:"
|
||||
msgid "Shop Name"
|
||||
msgstr "Nom botiga"
|
||||
|
||||
msgctxt "field:sale.shop,payment_term:"
|
||||
msgid "Payment Term"
|
||||
msgstr "Termini de pagament"
|
||||
|
||||
msgctxt "field:sale.shop,price_list:"
|
||||
msgid "Pricelist"
|
||||
msgstr "Tarifa"
|
||||
|
||||
msgctxt "field:sale.shop,rec_name:"
|
||||
msgid "Name"
|
||||
msgstr "Nom"
|
||||
|
||||
msgctxt "field:sale.shop,sale_invoice_method:"
|
||||
msgid "Sale Invoice Method"
|
||||
msgstr "Política de facturació"
|
||||
|
||||
msgctxt "field:sale.shop,sale_sequence:"
|
||||
msgid "Sale Reference Sequence"
|
||||
msgstr "Seqüència de la comanda"
|
||||
|
||||
msgctxt "field:sale.shop,sale_shipment_method:"
|
||||
msgid "Sale Shipment Method"
|
||||
msgstr "Política d'enviament"
|
||||
|
||||
msgctxt "field:sale.shop,users:"
|
||||
msgid "Users"
|
||||
msgstr "Usuaris"
|
||||
|
||||
msgctxt "field:sale.shop,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr "Magatzem"
|
||||
|
||||
msgctxt "field:sale.shop,write_date:"
|
||||
msgid "Write Date"
|
||||
msgstr "Data actualització"
|
||||
|
||||
msgctxt "field:sale.shop,write_uid:"
|
||||
msgid "Write User"
|
||||
msgstr "Usuari actualització"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,create_date:"
|
||||
msgid "Create Date"
|
||||
msgstr "Data creació"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,create_uid:"
|
||||
msgid "Create User"
|
||||
msgstr "Usuari creació"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,id:"
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,rec_name:"
|
||||
msgid "Name"
|
||||
msgstr "Nom"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,shop:"
|
||||
msgid "Shop"
|
||||
msgstr "Botiga"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,user:"
|
||||
msgid "User"
|
||||
msgstr "Usuari"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,write_date:"
|
||||
msgid "Write Date"
|
||||
msgstr "Data actualització"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,write_uid:"
|
||||
msgid "Write User"
|
||||
msgstr "Usuari actualització"
|
||||
|
||||
msgctxt "field:stock.shipment.out,shop_addresses:"
|
||||
msgid "Shop Addresses"
|
||||
msgstr "Adreces de la botiga"
|
||||
|
||||
msgctxt "field:stock.shipment.out.return,shop_addresses:"
|
||||
msgid "Shop Addresses"
|
||||
msgstr "Adreces de la botiga"
|
||||
|
||||
msgctxt "model:ir.action,name:act_sale_shop_form"
|
||||
msgid "Shops"
|
||||
msgstr "Botigues"
|
||||
|
||||
msgctxt "model:ir.ui.menu,name:menu_sale_shop"
|
||||
msgid "Shops"
|
||||
msgstr "Botigues"
|
||||
|
||||
msgctxt "model:sale.shop,name:"
|
||||
msgid "Sale Shop"
|
||||
msgstr "Botiga"
|
||||
|
||||
msgctxt "model:sale.shop-res.user,name:"
|
||||
msgid "Sale Shop - Res User"
|
||||
msgstr "Botigues - Usuaris"
|
||||
|
||||
msgctxt "selection:sale.shop,sale_invoice_method:"
|
||||
msgid "Manual"
|
||||
msgstr "Manual"
|
||||
|
||||
msgctxt "selection:sale.shop,sale_invoice_method:"
|
||||
msgid "On Order Processed"
|
||||
msgstr "Al processar la comanda"
|
||||
|
||||
msgctxt "selection:sale.shop,sale_invoice_method:"
|
||||
msgid "On Shipment Sent"
|
||||
msgstr "A l'enviar-ho"
|
||||
|
||||
msgctxt "selection:sale.shop,sale_shipment_method:"
|
||||
msgid "Manual"
|
||||
msgstr "Manual"
|
||||
|
||||
msgctxt "selection:sale.shop,sale_shipment_method:"
|
||||
msgid "On Invoice Paid"
|
||||
msgstr "Al pagar la factura"
|
||||
|
||||
msgctxt "selection:sale.shop,sale_shipment_method:"
|
||||
msgid "On Order Processed"
|
||||
msgstr "Al processar la comanda"
|
||||
|
||||
msgctxt "view:res.user:"
|
||||
msgid "Shops"
|
||||
msgstr "Botigues"
|
||||
|
||||
msgctxt "view:sale.shop:"
|
||||
msgid "General"
|
||||
msgstr "General"
|
||||
|
||||
msgctxt "view:sale.shop:"
|
||||
msgid "Shops"
|
||||
msgstr "Botigues"
|
||||
|
||||
msgctxt "view:sale.shop:"
|
||||
msgid "Users"
|
||||
msgstr "Usuaris"
|
|
@ -0,0 +1,203 @@
|
|||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "error:sale.sale:"
|
||||
msgid "Go to user preferences and select a shop (\"%s\")"
|
||||
msgstr ""
|
||||
"Bitte wählen Sie unter den Benutzereinstellungen eine Filiale aus (\"%s\")"
|
||||
|
||||
msgctxt "error:sale.sale:"
|
||||
msgid "Sale have not related a shop"
|
||||
msgstr "Verkauf ohne verknüpfte Filiale"
|
||||
|
||||
msgctxt "error:sale.sale:"
|
||||
msgid ""
|
||||
"You cannot edit this order because you do not have permission to edit in "
|
||||
"this shop."
|
||||
msgstr ""
|
||||
"Keine Berechtigung für die Bearbeitung von Bestellungen dieser Filiale"
|
||||
|
||||
msgctxt "field:res.user,shop:"
|
||||
msgid "Shop"
|
||||
msgstr "Filiale"
|
||||
|
||||
msgctxt "field:res.user,shops:"
|
||||
msgid "Shops"
|
||||
msgstr "Filialen"
|
||||
|
||||
msgctxt "field:sale.sale,shop:"
|
||||
msgid "Shop"
|
||||
msgstr "Filiale"
|
||||
|
||||
msgctxt "field:sale.sale,shop_address:"
|
||||
msgid "Shop Address"
|
||||
msgstr "Filialadresse"
|
||||
|
||||
msgctxt "field:sale.shop,active:"
|
||||
msgid "Active"
|
||||
msgstr "Aktiv"
|
||||
|
||||
msgctxt "field:sale.shop,address:"
|
||||
msgid "Address"
|
||||
msgstr "Adresse"
|
||||
|
||||
msgctxt "field:sale.shop,company:"
|
||||
msgid "Company"
|
||||
msgstr "Unternehmen"
|
||||
|
||||
msgctxt "field:sale.shop,company_party:"
|
||||
msgid "Company Party"
|
||||
msgstr "Partei Unternehmen"
|
||||
|
||||
msgctxt "field:sale.shop,create_date:"
|
||||
msgid "Create Date"
|
||||
msgstr "Erstellungsdatum"
|
||||
|
||||
msgctxt "field:sale.shop,create_uid:"
|
||||
msgid "Create User"
|
||||
msgstr "Erstellt durch"
|
||||
|
||||
msgctxt "field:sale.shop,id:"
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
msgctxt "field:sale.shop,name:"
|
||||
msgid "Shop Name"
|
||||
msgstr "Name"
|
||||
|
||||
msgctxt "field:sale.shop,payment_term:"
|
||||
msgid "Payment Term"
|
||||
msgstr "Zahlungsbedingung"
|
||||
|
||||
msgctxt "field:sale.shop,price_list:"
|
||||
msgid "Pricelist"
|
||||
msgstr "Preisliste"
|
||||
|
||||
msgctxt "field:sale.shop,rec_name:"
|
||||
msgid "Name"
|
||||
msgstr "Name"
|
||||
|
||||
msgctxt "field:sale.shop,sale_invoice_method:"
|
||||
msgid "Sale Invoice Method"
|
||||
msgstr "Rechnungsstellung Verkauf"
|
||||
|
||||
msgctxt "field:sale.shop,sale_sequence:"
|
||||
msgid "Sale Reference Sequence"
|
||||
msgstr "Nummernkreis Verkauf"
|
||||
|
||||
msgctxt "field:sale.shop,sale_shipment_method:"
|
||||
msgid "Sale Shipment Method"
|
||||
msgstr "Liefermethode Verkauf"
|
||||
|
||||
msgctxt "field:sale.shop,users:"
|
||||
msgid "Users"
|
||||
msgstr "Benutzer"
|
||||
|
||||
msgctxt "field:sale.shop,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr "Warenlager"
|
||||
|
||||
msgctxt "field:sale.shop,write_date:"
|
||||
msgid "Write Date"
|
||||
msgstr "Zuletzt geändert"
|
||||
|
||||
msgctxt "field:sale.shop,write_uid:"
|
||||
msgid "Write User"
|
||||
msgstr "Letzte Änderung durch"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,create_date:"
|
||||
msgid "Create Date"
|
||||
msgstr "Erstellungsdatum"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,create_uid:"
|
||||
msgid "Create User"
|
||||
msgstr "Erstellt durch"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,id:"
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,rec_name:"
|
||||
msgid "Name"
|
||||
msgstr "Name"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,shop:"
|
||||
msgid "Shop"
|
||||
msgstr "Filiale"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,user:"
|
||||
msgid "User"
|
||||
msgstr "Benutzer"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,write_date:"
|
||||
msgid "Write Date"
|
||||
msgstr "Zuletzt geändert"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,write_uid:"
|
||||
msgid "Write User"
|
||||
msgstr "Letzte Änderung durch"
|
||||
|
||||
msgctxt "field:stock.shipment.out,shop_addresses:"
|
||||
msgid "Shop Addresses"
|
||||
msgstr "Filialadressen"
|
||||
|
||||
msgctxt "field:stock.shipment.out.return,shop_addresses:"
|
||||
msgid "Shop Addresses"
|
||||
msgstr "Filialadressen"
|
||||
|
||||
msgctxt "model:ir.action,name:act_sale_shop_form"
|
||||
msgid "Shops"
|
||||
msgstr "Filialen"
|
||||
|
||||
msgctxt "model:ir.ui.menu,name:menu_sale_shop"
|
||||
msgid "Shops"
|
||||
msgstr "Filialen"
|
||||
|
||||
msgctxt "model:sale.shop,name:"
|
||||
msgid "Sale Shop"
|
||||
msgstr "Filiale"
|
||||
|
||||
msgctxt "model:sale.shop-res.user,name:"
|
||||
msgid "Sale Shop - Res User"
|
||||
msgstr "Filiale - Benutzer"
|
||||
|
||||
msgctxt "selection:sale.shop,sale_invoice_method:"
|
||||
msgid "Manual"
|
||||
msgstr "Manuell"
|
||||
|
||||
msgctxt "selection:sale.shop,sale_invoice_method:"
|
||||
msgid "On Order Processed"
|
||||
msgstr "Nach Auftragsausführung"
|
||||
|
||||
msgctxt "selection:sale.shop,sale_invoice_method:"
|
||||
msgid "On Shipment Sent"
|
||||
msgstr "Bei Versand"
|
||||
|
||||
msgctxt "selection:sale.shop,sale_shipment_method:"
|
||||
msgid "Manual"
|
||||
msgstr "Manuell"
|
||||
|
||||
msgctxt "selection:sale.shop,sale_shipment_method:"
|
||||
msgid "On Invoice Paid"
|
||||
msgstr "Bei Bezahlung"
|
||||
|
||||
msgctxt "selection:sale.shop,sale_shipment_method:"
|
||||
msgid "On Order Processed"
|
||||
msgstr "Nach Auftragsausführung"
|
||||
|
||||
msgctxt "view:res.user:"
|
||||
msgid "Shops"
|
||||
msgstr "Filialen"
|
||||
|
||||
msgctxt "view:sale.shop:"
|
||||
msgid "General"
|
||||
msgstr "Allgemein"
|
||||
|
||||
msgctxt "view:sale.shop:"
|
||||
msgid "Shops"
|
||||
msgstr "Filialen"
|
||||
|
||||
msgctxt "view:sale.shop:"
|
||||
msgid "Users"
|
||||
msgstr "Benutzer"
|
|
@ -0,0 +1,459 @@
|
|||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "error:sale.sale:"
|
||||
msgid "Go to user preferences and select a shop (\"%s\")"
|
||||
msgstr "Seleccione una tienda en sus preferencias (\"%s\")"
|
||||
|
||||
msgctxt "error:sale.sale:"
|
||||
msgid "Return Sale Sequence is missing!"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "error:sale.sale:"
|
||||
msgid "Sale have not related a shop"
|
||||
msgstr "La venta no está relacionado con una tienda"
|
||||
|
||||
msgctxt "error:sale.sale:"
|
||||
msgid ""
|
||||
"There is another sale with the same number.\n"
|
||||
"The number of the sale must be unique!"
|
||||
msgstr ""
|
||||
"Hay otra venta con el mismo número.\n"
|
||||
"El número de la venta debe ser único!"
|
||||
|
||||
msgctxt "error:sale.sale:"
|
||||
msgid ""
|
||||
"You cannot edit this order because you do not have permission to edit in "
|
||||
"this shop."
|
||||
msgstr ""
|
||||
"No puede editar este pedido porque no dispone de permiso de edición en esta "
|
||||
"tienda."
|
||||
|
||||
msgctxt "field:account.invoice,authorization:"
|
||||
msgid "Authorization"
|
||||
msgstr "Autorización"
|
||||
|
||||
msgctxt "field:account.invoice,shop:"
|
||||
msgid "Shop"
|
||||
msgstr "Tienda"
|
||||
|
||||
msgctxt "field:res.user,shop:"
|
||||
msgid "Shop"
|
||||
msgstr "Tienda"
|
||||
|
||||
msgctxt "field:res.user,shops:"
|
||||
msgid "Shops"
|
||||
msgstr "Tiendas"
|
||||
|
||||
msgctxt "field:sale.configuration,default_description:"
|
||||
msgid "Default Description"
|
||||
msgstr "Descripción por Defecto"
|
||||
|
||||
msgctxt "field:sale.configuration,default_invoice_type:"
|
||||
msgid "Default Invoice Type"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:sale.configuration,use_description_product:"
|
||||
msgid "Use Description Product"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:sale.sale,shop:"
|
||||
msgid "Shop"
|
||||
msgstr "Tienda"
|
||||
|
||||
msgctxt "field:sale.sale,shop_address:"
|
||||
msgid "Shop Address"
|
||||
msgstr "Dirección de la Tienda"
|
||||
|
||||
msgctxt "field:sale.shop,active:"
|
||||
msgid "Active"
|
||||
msgstr "Activo"
|
||||
|
||||
msgctxt "field:sale.shop,address:"
|
||||
msgid "Address"
|
||||
msgstr "Dirección de la Tienda"
|
||||
|
||||
msgctxt "field:sale.shop,company:"
|
||||
msgid "Company"
|
||||
msgstr "Compañia"
|
||||
|
||||
msgctxt "field:sale.shop,company_party:"
|
||||
msgid "Company Party"
|
||||
msgstr "Tercero de la Compañia"
|
||||
|
||||
msgctxt "field:sale.shop,create_date:"
|
||||
msgid "Create Date"
|
||||
msgstr "Fecha de Creación"
|
||||
|
||||
msgctxt "field:sale.shop,create_uid:"
|
||||
msgid "Create User"
|
||||
msgstr "Creado por Usuario"
|
||||
|
||||
msgctxt "field:sale.shop,currency:"
|
||||
msgid "Currency"
|
||||
msgstr "Moneda"
|
||||
|
||||
msgctxt "field:sale.shop,id:"
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
msgctxt "field:sale.shop,name:"
|
||||
msgid "Shop Name"
|
||||
msgstr "Nombre Tienda"
|
||||
|
||||
msgctxt "field:sale.shop,payment_term:"
|
||||
msgid "Payment Term"
|
||||
msgstr "Forma de Pago"
|
||||
|
||||
msgctxt "field:sale.shop,price_list:"
|
||||
msgid "Pricelist"
|
||||
msgstr "Lista de Precios"
|
||||
|
||||
msgctxt "field:sale.shop,rec_name:"
|
||||
msgid "Record Name"
|
||||
msgstr "Nombre"
|
||||
|
||||
msgctxt "field:sale.shop,sale_invoice_method:"
|
||||
msgid "Sale Invoice Method"
|
||||
msgstr "Política de Facturación"
|
||||
|
||||
msgctxt "field:sale.shop,sale_return_sequence:"
|
||||
msgid "Sale Return Sequence"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:sale.shop,sale_sequence:"
|
||||
msgid "Sale Reference Sequence"
|
||||
msgstr "Secuencia de Venta"
|
||||
|
||||
msgctxt "field:sale.shop,sale_shipment_method:"
|
||||
msgid "Sale Shipment Method"
|
||||
msgstr "Política de Envío"
|
||||
|
||||
msgctxt "field:sale.shop,users:"
|
||||
msgid "Users"
|
||||
msgstr "Usuarios"
|
||||
|
||||
msgctxt "field:sale.shop,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr "Almacén"
|
||||
|
||||
msgctxt "field:sale.shop,write_date:"
|
||||
msgid "Write Date"
|
||||
msgstr "Fecha de Modificación"
|
||||
|
||||
msgctxt "field:sale.shop,write_uid:"
|
||||
msgid "Write User"
|
||||
msgstr "Modificado por Usuario"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,create_date:"
|
||||
msgid "Create Date"
|
||||
msgstr "Fecha de Creación"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,create_uid:"
|
||||
msgid "Create User"
|
||||
msgstr "Creado por Usuario"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,id:"
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,rec_name:"
|
||||
msgid "Record Name"
|
||||
msgstr "Nombre"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,shop:"
|
||||
msgid "Shop"
|
||||
msgstr "Tienda"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,user:"
|
||||
msgid "User"
|
||||
msgstr "Usuario"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,write_date:"
|
||||
msgid "Write Date"
|
||||
msgstr "Fecha de Modificación"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,write_uid:"
|
||||
msgid "Write User"
|
||||
msgstr "Modificado por Usuario"
|
||||
|
||||
msgctxt "field:sale.zone,code:"
|
||||
msgid "Code"
|
||||
msgstr "Código / Número Interno"
|
||||
|
||||
msgctxt "field:sale.zone,create_date:"
|
||||
msgid "Create Date"
|
||||
msgstr "Fecha de Creación"
|
||||
|
||||
msgctxt "field:sale.zone,create_uid:"
|
||||
msgid "Create User"
|
||||
msgstr "Usuario de creción"
|
||||
|
||||
msgctxt "field:sale.zone,id:"
|
||||
msgid "ID"
|
||||
msgstr "UP"
|
||||
|
||||
msgctxt "field:sale.zone,name:"
|
||||
msgid "Name"
|
||||
msgstr "Nombre del registro"
|
||||
|
||||
msgctxt "field:sale.zone,rec_name:"
|
||||
msgid "Record Name"
|
||||
msgstr "Nombre del registro"
|
||||
|
||||
msgctxt "field:sale.zone,write_date:"
|
||||
msgid "Write Date"
|
||||
msgstr "Modificado por Usuario"
|
||||
|
||||
msgctxt "field:sale.zone,write_uid:"
|
||||
msgid "Write User"
|
||||
msgstr "Usuario modificación"
|
||||
|
||||
msgctxt "field:sale_shop.sale_by_supplier.start,company:"
|
||||
msgid "Company"
|
||||
msgstr "Compañía"
|
||||
|
||||
msgctxt "field:sale_shop.sale_by_supplier.start,end_date:"
|
||||
msgid "End Date"
|
||||
msgstr "Fecha Final"
|
||||
|
||||
msgctxt "field:sale_shop.sale_by_supplier.start,id:"
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
msgctxt "field:sale_shop.sale_by_supplier.start,start_date:"
|
||||
msgid "Start Date"
|
||||
msgstr "Fecha Inicio"
|
||||
|
||||
msgctxt "field:sale_shop.sale_by_supplier.start,supplier:"
|
||||
msgid "Supplier"
|
||||
msgstr "Proveedor"
|
||||
|
||||
msgctxt "field:stock.shipment.out,shop_addresses:"
|
||||
msgid "Shop Addresses"
|
||||
msgstr "Direcciones de la Tienda"
|
||||
|
||||
msgctxt "field:stock.shipment.out.return,shop_addresses:"
|
||||
msgid "Shop Addresses"
|
||||
msgstr "Direcciones de la Tienda"
|
||||
|
||||
msgctxt "model:ir.action,name:act_sale_shop_form"
|
||||
msgid "Shops"
|
||||
msgstr "Tiendas"
|
||||
|
||||
msgctxt "model:ir.action,name:act_sale_zone_form"
|
||||
msgid "Zones"
|
||||
msgstr "Zonas"
|
||||
|
||||
msgctxt "model:ir.action,name:report_sale_by_supplier"
|
||||
msgid "Report Sale By Supplier"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "model:ir.action,name:wizard_print_sale_by_supplier"
|
||||
msgid "Sale By Supplier"
|
||||
msgstr "Reporte Ventas Por Proveedor"
|
||||
|
||||
msgctxt "model:ir.ui.menu,name:menu_sale_by_supplier_report"
|
||||
msgid "Sale By Supplier"
|
||||
msgstr "Reporte Ventas Por Proveedor"
|
||||
|
||||
msgctxt "model:ir.ui.menu,name:menu_sale_shop"
|
||||
msgid "Shops"
|
||||
msgstr "Tiendas"
|
||||
|
||||
msgctxt "model:ir.ui.menu,name:menu_sale_zone"
|
||||
msgid "Zones"
|
||||
msgstr "Zonas"
|
||||
|
||||
msgctxt "model:sale.shop,name:"
|
||||
msgid "Sale Shop"
|
||||
msgstr "Tienda"
|
||||
|
||||
msgctxt "model:sale.shop-res.user,name:"
|
||||
msgid "Sale Shop - Res User"
|
||||
msgstr "Tienda - Usuario"
|
||||
|
||||
msgctxt "model:sale.zone,name:"
|
||||
msgid "Zones"
|
||||
msgstr "Zonas"
|
||||
|
||||
msgctxt "model:sale_shop.sale_by_supplier.start,name:"
|
||||
msgid "Sale By Supplier Start"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "$"
|
||||
msgstr "$"
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "%"
|
||||
msgstr "%"
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "("
|
||||
msgstr "("
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid ")"
|
||||
msgstr ")"
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid ","
|
||||
msgstr ","
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "-"
|
||||
msgstr "-"
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "/"
|
||||
msgstr "/"
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "/for"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "00/00/0000"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "00:00:00"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "???"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "CANTIDAD"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "CODIGO"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "FECHA FINAL:"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "FECHA INICIAL:"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "PRODUCTO"
|
||||
msgstr "Producto"
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "PROVEEDOR:"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "Página"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "REPORTE"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "TOTAL"
|
||||
msgstr "TOTAL"
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "VENTAS POR PROVEEDOR"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "company.party.name"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "end_date"
|
||||
msgstr "Fecha Final"
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "for each='product in records'"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "product['code']"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "product['name']"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "start_date"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "sum(product['amount'])"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "sum(product['quantity'])"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "supplier"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "total"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "report:sale_shop.sale_by_supplier_report:"
|
||||
msgid "€"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:sale.shop,sale_invoice_method:"
|
||||
msgid "Manual"
|
||||
msgstr "Manual"
|
||||
|
||||
msgctxt "selection:sale.shop,sale_invoice_method:"
|
||||
msgid "On Order Processed"
|
||||
msgstr "Al Procesar Pedido "
|
||||
|
||||
msgctxt "selection:sale.shop,sale_invoice_method:"
|
||||
msgid "On Shipment Sent"
|
||||
msgstr "Al Enviar"
|
||||
|
||||
msgctxt "selection:sale.shop,sale_shipment_method:"
|
||||
msgid "Manual"
|
||||
msgstr "Manual"
|
||||
|
||||
msgctxt "selection:sale.shop,sale_shipment_method:"
|
||||
msgid "On Invoice Paid"
|
||||
msgstr "Al Pagar Factura"
|
||||
|
||||
msgctxt "selection:sale.shop,sale_shipment_method:"
|
||||
msgid "On Order Processed"
|
||||
msgstr "Al Procesar Pedido"
|
||||
|
||||
msgctxt "view:res.user:"
|
||||
msgid "Shops"
|
||||
msgstr "Tiendas"
|
||||
|
||||
msgctxt "view:sale.shop:"
|
||||
msgid "General"
|
||||
msgstr "General"
|
||||
|
||||
msgctxt "view:sale.shop:"
|
||||
msgid "Users"
|
||||
msgstr "Usuarios"
|
||||
|
||||
msgctxt "view:sale_shop.sale_by_supplier.start:"
|
||||
msgid "Sale by Supplier"
|
||||
msgstr "Reporte Ventas Por Proveedor"
|
||||
|
||||
msgctxt "wizard_button:sale_shop.print_sale_by_supplier,start,end:"
|
||||
msgid "Cancel"
|
||||
msgstr "Cancelar"
|
||||
|
||||
msgctxt "wizard_button:sale_shop.print_sale_by_supplier,start,print_:"
|
||||
msgid "Print"
|
||||
msgstr "Imprimir"
|
|
@ -0,0 +1,212 @@
|
|||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "error:sale.sale:"
|
||||
msgid "Go to user preferences and select a shop (\"%s\")"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "error:sale.sale:"
|
||||
msgid "Sale have not related a shop"
|
||||
msgstr "Vente non liées a un magasin"
|
||||
|
||||
msgctxt "error:sale.sale:"
|
||||
msgid ""
|
||||
"You cannot edit this order because you do not have permission to edit in "
|
||||
"this shop."
|
||||
msgstr ""
|
||||
"Vous ne pouvez pas modifier cette commande car vous n'avez pas les "
|
||||
"permissions d'édition sur ce magasin."
|
||||
|
||||
msgctxt "field:res.user,shop:"
|
||||
msgid "Shop"
|
||||
msgstr "Magasin"
|
||||
|
||||
msgctxt "field:res.user,shops:"
|
||||
msgid "Shops"
|
||||
msgstr "Magasins"
|
||||
|
||||
msgctxt "field:sale.sale,shop:"
|
||||
msgid "Shop"
|
||||
msgstr "Magasin"
|
||||
|
||||
msgctxt "field:sale.sale,shop_address:"
|
||||
msgid "Shop Address"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "field:sale.shop,active:"
|
||||
msgid "Active"
|
||||
msgstr "Actif"
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "field:sale.shop,address:"
|
||||
msgid "Address"
|
||||
msgstr "Adresse"
|
||||
|
||||
msgctxt "field:sale.shop,company:"
|
||||
msgid "Company"
|
||||
msgstr "Société"
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "field:sale.shop,company_party:"
|
||||
msgid "Company Party"
|
||||
msgstr "Tiers de la société"
|
||||
|
||||
msgctxt "field:sale.shop,create_date:"
|
||||
msgid "Create Date"
|
||||
msgstr "Date de création"
|
||||
|
||||
msgctxt "field:sale.shop,create_uid:"
|
||||
msgid "Create User"
|
||||
msgstr "Créé par "
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "field:sale.shop,currency:"
|
||||
msgid "Currency"
|
||||
msgstr "Devises"
|
||||
|
||||
msgctxt "field:sale.shop,id:"
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
msgctxt "field:sale.shop,name:"
|
||||
msgid "Shop Name"
|
||||
msgstr "Nom du magasin"
|
||||
|
||||
msgctxt "field:sale.shop,payment_term:"
|
||||
msgid "Payment Term"
|
||||
msgstr "Conditions de paiement"
|
||||
|
||||
msgctxt "field:sale.shop,price_list:"
|
||||
msgid "Pricelist"
|
||||
msgstr "Tarif"
|
||||
|
||||
msgctxt "field:sale.shop,rec_name:"
|
||||
msgid "Name"
|
||||
msgstr "Nom"
|
||||
|
||||
msgctxt "field:sale.shop,sale_invoice_method:"
|
||||
msgid "Sale Invoice Method"
|
||||
msgstr "Méthode de facturation"
|
||||
|
||||
msgctxt "field:sale.shop,sale_sequence:"
|
||||
msgid "Sale Reference Sequence"
|
||||
msgstr "Séquence de référence de vente"
|
||||
|
||||
msgctxt "field:sale.shop,sale_shipment_method:"
|
||||
msgid "Sale Shipment Method"
|
||||
msgstr "Méthode d'expédition"
|
||||
|
||||
msgctxt "field:sale.shop,users:"
|
||||
msgid "Users"
|
||||
msgstr "Utilisateurs"
|
||||
|
||||
msgctxt "field:sale.shop,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr "Entrepôt"
|
||||
|
||||
msgctxt "field:sale.shop,write_date:"
|
||||
msgid "Write Date"
|
||||
msgstr "Date de mise à jour"
|
||||
|
||||
msgctxt "field:sale.shop,write_uid:"
|
||||
msgid "Write User"
|
||||
msgstr "Mis à jour par"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,create_date:"
|
||||
msgid "Create Date"
|
||||
msgstr "Date de création"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,create_uid:"
|
||||
msgid "Create User"
|
||||
msgstr "Créé par"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,id:"
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,rec_name:"
|
||||
msgid "Name"
|
||||
msgstr "Nom"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,shop:"
|
||||
msgid "Shop"
|
||||
msgstr "Magasin"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,user:"
|
||||
msgid "User"
|
||||
msgstr "Utilisateur"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,write_date:"
|
||||
msgid "Write Date"
|
||||
msgstr "Date de mise à jour"
|
||||
|
||||
msgctxt "field:sale.shop-res.user,write_uid:"
|
||||
msgid "Write User"
|
||||
msgstr "Mis à jour par"
|
||||
|
||||
msgctxt "field:stock.shipment.out,shop_addresses:"
|
||||
msgid "Shop Addresses"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:stock.shipment.out.return,shop_addresses:"
|
||||
msgid "Shop Addresses"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "model:ir.action,name:act_sale_shop_form"
|
||||
msgid "Shops"
|
||||
msgstr "Magasins"
|
||||
|
||||
msgctxt "model:ir.ui.menu,name:menu_sale_shop"
|
||||
msgid "Shops"
|
||||
msgstr "Magasins"
|
||||
|
||||
msgctxt "model:sale.shop,name:"
|
||||
msgid "Sale Shop"
|
||||
msgstr "Magasin de vente"
|
||||
|
||||
msgctxt "model:sale.shop-res.user,name:"
|
||||
msgid "Sale Shop - Res User"
|
||||
msgstr "Magasin de vente - Utilisateur"
|
||||
|
||||
msgctxt "selection:sale.shop,sale_invoice_method:"
|
||||
msgid "Manual"
|
||||
msgstr "Manuel"
|
||||
|
||||
msgctxt "selection:sale.shop,sale_invoice_method:"
|
||||
msgid "On Order Processed"
|
||||
msgstr "Sur traitement de l'ordre"
|
||||
|
||||
msgctxt "selection:sale.shop,sale_invoice_method:"
|
||||
msgid "On Shipment Sent"
|
||||
msgstr "À la livraison"
|
||||
|
||||
msgctxt "selection:sale.shop,sale_shipment_method:"
|
||||
msgid "Manual"
|
||||
msgstr "Manuel"
|
||||
|
||||
msgctxt "selection:sale.shop,sale_shipment_method:"
|
||||
msgid "On Invoice Paid"
|
||||
msgstr "Au paiement"
|
||||
|
||||
msgctxt "selection:sale.shop,sale_shipment_method:"
|
||||
msgid "On Order Processed"
|
||||
msgstr "Sur traitement de l'ordre"
|
||||
|
||||
msgctxt "view:res.user:"
|
||||
msgid "Shops"
|
||||
msgstr "Magasins"
|
||||
|
||||
msgctxt "view:sale.shop:"
|
||||
msgid "General"
|
||||
msgstr "Général"
|
||||
|
||||
msgctxt "view:sale.shop:"
|
||||
msgid "Shops"
|
||||
msgstr "Magasins"
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "view:sale.shop:"
|
||||
msgid "Users"
|
||||
msgstr "Utilisateurs"
|
|
@ -0,0 +1,359 @@
|
|||
# This file is part sale_shop module for Tryton.
|
||||
# The COPYRIGHT file at the top level of this repository contains the full
|
||||
# copyright notices and license terms.
|
||||
from decimal import Decimal
|
||||
|
||||
from trytond import backend
|
||||
from trytond.model import fields, Unique, ModelView
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.pyson import Bool, Eval, Or
|
||||
import logging
|
||||
from trytond.report import Report
|
||||
from trytond.wizard import Wizard, StateView, StateReport, Button
|
||||
|
||||
__all__ = ['Sale', 'SaleBySupplierStart', 'SaleBySupplier',
|
||||
'PrintSaleBySupplier', 'SaleLine']
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class SaleLine(metaclass=PoolMeta):
|
||||
__name__ = 'sale.line'
|
||||
|
||||
@fields.depends('product', 'unit', 'quantity', 'description',
|
||||
'_parent_sale.party', '_parent_sale.currency',
|
||||
'_parent_sale.sale_date')
|
||||
def on_change_product(self):
|
||||
super(SaleLine, self).on_change_product()
|
||||
config = Pool().get('sale.configuration')(1)
|
||||
if config.use_description_product and self.product and self.product.description:
|
||||
self.description = self.product.template.name + ' | ' + self.product.description
|
||||
|
||||
|
||||
class SaleBySupplierStart(ModelView):
|
||||
'Sale By Supplier Start'
|
||||
__name__ = 'sale_shop.sale_by_supplier.start'
|
||||
start_date = fields.Date('Start Date', required=True)
|
||||
end_date = fields.Date('End Date', required=True)
|
||||
supplier = fields.Many2One('party.party', 'Supplier', required=True)
|
||||
company = fields.Many2One('company.company', 'Company',
|
||||
required=True)
|
||||
|
||||
@staticmethod
|
||||
def default_company():
|
||||
return Transaction().context.get('company')
|
||||
|
||||
@staticmethod
|
||||
def default_end_date():
|
||||
Date_ = Pool().get('ir.date')
|
||||
return Date_.today()
|
||||
|
||||
|
||||
class PrintSaleBySupplier(Wizard):
|
||||
'Sale By Supplier'
|
||||
__name__ = 'sale_shop.print_sale_by_supplier'
|
||||
start = StateView('sale_shop.sale_by_supplier.start',
|
||||
'sale_shop.print_sale_by_supplier_start_view_form', [
|
||||
Button('Cancel', 'end', 'tryton-cancel'),
|
||||
Button('Print', 'print_', 'tryton-print', default=True),
|
||||
])
|
||||
print_ = StateReport('sale_shop.sale_by_supplier_report')
|
||||
|
||||
def do_print_(self, action):
|
||||
|
||||
data = {
|
||||
'company': self.start.company.id,
|
||||
'start_date': self.start.start_date,
|
||||
'end_date': self.start.end_date,
|
||||
'supplier': self.start.supplier.id,
|
||||
}
|
||||
return action, data
|
||||
|
||||
def transition_print_(self):
|
||||
return 'end'
|
||||
|
||||
class SaleBySupplier(Report):
|
||||
'Sale By Supplier Report'
|
||||
__name__ = 'sale_shop.sale_by_supplier_report'
|
||||
|
||||
@classmethod
|
||||
def get_context(cls, records, data):
|
||||
report_context = super(SaleBySupplier, cls).get_context(records, data)
|
||||
pool = Pool()
|
||||
Company = pool.get('company.company')
|
||||
ProductSupplier = pool.get('purchase.product_supplier')
|
||||
SaleLine = pool.get('sale.line')
|
||||
Party = pool.get('party.party')
|
||||
company = Company(data['company'])
|
||||
party = Party(data['supplier'])
|
||||
products_suppliers = ProductSupplier.search([
|
||||
('party', '=', data['supplier']),
|
||||
])
|
||||
templates = [p.product for p in products_suppliers]
|
||||
records = {}
|
||||
total = []
|
||||
lines = SaleLine.search([
|
||||
('product.template', 'in', templates),
|
||||
('sale.sale_date', '>=', data['start_date']),
|
||||
('sale.sale_date', '<=', data['end_date']),
|
||||
])
|
||||
for line in lines:
|
||||
if line.product not in records.keys():
|
||||
records[line.product] = {
|
||||
'code': line.product.code,
|
||||
'name': line.product.template.name,
|
||||
'quantity': [],
|
||||
'amount': [],
|
||||
}
|
||||
records[line.product]['quantity'].append(line.quantity)
|
||||
records[line.product]['amount'].append(line.amount)
|
||||
total.append(line.amount)
|
||||
|
||||
report_context['records'] = records.values()
|
||||
report_context['start_date'] = data['start_date']
|
||||
report_context['end_date'] = data['end_date']
|
||||
report_context['supplier'] = party.name
|
||||
report_context['company'] = company
|
||||
report_context['total'] = sum(total)
|
||||
return report_context
|
||||
|
||||
|
||||
class Sale(metaclass=PoolMeta):
|
||||
__name__ = 'sale.sale'
|
||||
shop = fields.Many2One('sale.shop', 'Shop', required=True, domain=[
|
||||
('id', 'in', Eval('context', {}).get('shops', [])),
|
||||
],
|
||||
states={
|
||||
'readonly': Or(Bool(Eval('number')), Bool(Eval('lines'))),
|
||||
}, depends=['number', 'lines'])
|
||||
shop_address = fields.Function(fields.Many2One('party.address',
|
||||
'Shop Address'),
|
||||
'on_change_with_shop_address')
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super(Sale, cls).__setup__()
|
||||
t = cls.__table__()
|
||||
cls._sql_constraints.extend([
|
||||
('number_uniq', Unique(t, t.shop, t.number),
|
||||
'There is another sale with the same number.\n'
|
||||
'The number of the sale must be unique!')
|
||||
])
|
||||
|
||||
shipment_addr_domain = cls.shipment_address.domain[:]
|
||||
if shipment_addr_domain:
|
||||
cls.shipment_address.domain = [
|
||||
'OR',
|
||||
shipment_addr_domain,
|
||||
[('id', '=', Eval('shop_address', 0))],
|
||||
]
|
||||
else:
|
||||
cls.shipment_address.domain = [('id', '=', Eval('shop_address'))]
|
||||
cls.shipment_address.depends.append('shop_address')
|
||||
cls.currency.states['readonly'] = Eval('state') != 'draft'
|
||||
cls.currency.depends.append('shop')
|
||||
|
||||
cls._error_messages.update({
|
||||
'not_sale_shop': (
|
||||
'Go to user preferences and select a shop ("%s")'),
|
||||
'no_return_sequence': (
|
||||
'Return Sale Sequence is missing!'),
|
||||
'sale_not_shop': (
|
||||
'Sale have not related a shop'),
|
||||
'edit_sale_by_shop': ('You cannot edit this order because you '
|
||||
'do not have permission to edit in this shop.'),
|
||||
})
|
||||
|
||||
|
||||
@classmethod
|
||||
def __register__(cls, module_name):
|
||||
TableHandler = backend.get('TableHandler')
|
||||
table = TableHandler(cls, module_name)
|
||||
# if not table.column_exist('shop'):
|
||||
# table.add_raw_column(
|
||||
# 'shop',
|
||||
# cls.shop.sql_type(),
|
||||
# cls.shop.sql_format, None, None
|
||||
# )
|
||||
# logger.warning(
|
||||
# 'Create a Sale Shop and assign current sales with this shop '
|
||||
# 'with SQL:')
|
||||
# logger.warning(
|
||||
# 'UPDATE sale_sale set shop = 1;')
|
||||
|
||||
# Migration from 3.8: remove reference constraint
|
||||
if not table.column_exist('number'):
|
||||
table.drop_constraint('reference_uniq')
|
||||
|
||||
super(Sale, cls).__register__(module_name)
|
||||
|
||||
@staticmethod
|
||||
def default_company():
|
||||
User = Pool().get('res.user')
|
||||
user = User(Transaction().user)
|
||||
return user.shop.company.id if user.shop else \
|
||||
Transaction().context.get('company')
|
||||
|
||||
@staticmethod
|
||||
def default_shop():
|
||||
User = Pool().get('res.user')
|
||||
user = User(Transaction().user)
|
||||
return user.shop.id if user.shop else None
|
||||
|
||||
@staticmethod
|
||||
def default_invoice_method():
|
||||
User = Pool().get('res.user')
|
||||
user = User(Transaction().user)
|
||||
if not user.shop:
|
||||
Config = Pool().get('sale.configuration')
|
||||
config = Config(1)
|
||||
return config.sale_invoice_method
|
||||
return user.shop.sale_invoice_method
|
||||
|
||||
@staticmethod
|
||||
def default_description():
|
||||
config = Pool().get('sale.configuration')(1)
|
||||
if config.default_description:
|
||||
return config.default_description
|
||||
|
||||
@staticmethod
|
||||
def default_shipment_method():
|
||||
User = Pool().get('res.user')
|
||||
user = User(Transaction().user)
|
||||
if not user.shop:
|
||||
Config = Pool().get('sale.configuration')
|
||||
config = Config(1)
|
||||
return config.sale_shipment_method
|
||||
return user.shop.sale_shipment_method
|
||||
|
||||
@staticmethod
|
||||
def default_warehouse():
|
||||
User = Pool().get('res.user')
|
||||
user = User(Transaction().user)
|
||||
if user.shop:
|
||||
return user.shop.warehouse.id
|
||||
else:
|
||||
Location = Pool().get('stock.location')
|
||||
return Location.search([('type', '=', 'warehouse')], limit=1)[0].id
|
||||
|
||||
@staticmethod
|
||||
def default_price_list():
|
||||
User = Pool().get('res.user')
|
||||
user = User(Transaction().user)
|
||||
return user.shop.price_list.id if user.shop else None
|
||||
|
||||
@staticmethod
|
||||
def default_payment_term():
|
||||
User = Pool().get('res.user')
|
||||
user = User(Transaction().user)
|
||||
return user.shop.payment_term.id if user.shop else None
|
||||
|
||||
@staticmethod
|
||||
def default_shop_address():
|
||||
User = Pool().get('res.user')
|
||||
user = User(Transaction().user)
|
||||
return (user.shop and user.shop.address and
|
||||
user.shop.address.id or None)
|
||||
|
||||
@fields.depends('shop', 'party')
|
||||
def on_change_shop(self):
|
||||
if not self.shop:
|
||||
return
|
||||
for fname in ('company', 'warehouse', 'currency', 'payment_term'):
|
||||
fvalue = getattr(self.shop, fname)
|
||||
if fvalue:
|
||||
setattr(self, fname, fvalue.id)
|
||||
if ((not self.party or not self.party.sale_price_list)
|
||||
and self.shop.price_list):
|
||||
self.price_list = self.shop.price_list.id
|
||||
if self.shop.sale_invoice_method:
|
||||
self.invoice_method = self.shop.sale_invoice_method
|
||||
if self.shop.sale_shipment_method:
|
||||
self.shipment_method = self.shop.sale_shipment_method
|
||||
|
||||
@fields.depends('shop')
|
||||
def on_change_with_shop_address(self, name=None):
|
||||
return (self.shop and self.shop.address and
|
||||
self.shop.address.id or None)
|
||||
|
||||
@fields.depends('shop', 'party')
|
||||
def on_change_party(self):
|
||||
super(Sale, self).on_change_party()
|
||||
if self.shop:
|
||||
if not self.price_list and self.invoice_address:
|
||||
self.price_list = self.shop.price_list.id
|
||||
self.price_list.rec_name = self.shop.price_list.rec_name
|
||||
if not self.payment_term and self.invoice_address:
|
||||
self.payment_term = self.shop.payment_term.id
|
||||
self.payment_term.rec_name = self.shop.payment_term.rec_name
|
||||
|
||||
@classmethod
|
||||
def set_number(cls, sales):
|
||||
'''
|
||||
Fill the number field with the sale shop or sale config sequence
|
||||
'''
|
||||
pool = Pool()
|
||||
Sequence = pool.get('ir.sequence')
|
||||
Config = pool.get('sale.configuration')
|
||||
User = Pool().get('res.user')
|
||||
config = Config(1)
|
||||
user = User(Transaction().user)
|
||||
for sale in sales:
|
||||
if sale.number:
|
||||
continue
|
||||
elif sale.shop:
|
||||
if sale.total_amount >= Decimal('0'):
|
||||
number = Sequence.get_id(sale.shop.sale_sequence.id)
|
||||
else:
|
||||
if not sale.shop.sale_return_sequence:
|
||||
sale.raise_user_error('no_return_sequence')
|
||||
number = Sequence.get_id(sale.shop.sale_return_sequence.id)
|
||||
elif user.shop:
|
||||
number = Sequence.get_id(user.shop.sale_sequence.id)
|
||||
else:
|
||||
number = Sequence.get_id(config.sale_sequence.id)
|
||||
cls.write([sale], {
|
||||
'number': number,
|
||||
})
|
||||
|
||||
@classmethod
|
||||
def create(cls, vlist):
|
||||
vlist2 = []
|
||||
for vals in vlist:
|
||||
User = Pool().get('res.user')
|
||||
user = User(Transaction().user)
|
||||
vals = vals.copy()
|
||||
if not 'shop' in vals:
|
||||
if not user.shop:
|
||||
cls.raise_user_error('not_sale_shop', (
|
||||
user.rec_name,)
|
||||
)
|
||||
vals['shop'] = user.shop.id
|
||||
vlist2.append(vals)
|
||||
return super(Sale, cls).create(vlist2)
|
||||
|
||||
@classmethod
|
||||
def write(cls, *args):
|
||||
'''
|
||||
Only edit Sale users available edit in this shop
|
||||
'''
|
||||
User = Pool().get('res.user')
|
||||
user = User(Transaction().user)
|
||||
if user.id != 0:
|
||||
actions = iter(args)
|
||||
for sales, _ in zip(actions, actions):
|
||||
for sale in sales:
|
||||
if not sale.shop:
|
||||
cls.raise_user_error('sale_not_shop')
|
||||
if not sale.shop in user.shops:
|
||||
cls.raise_user_error('edit_sale_by_shop')
|
||||
super(Sale, cls).write(*args)
|
||||
|
||||
def _get_invoice_sale(self):
|
||||
invoice = super(Sale, self)._get_invoice_sale()
|
||||
invoice.reference = self.reference
|
||||
invoice.description = self.description
|
||||
invoice.comment = self.comment
|
||||
invoice.shop = self.shop.id
|
||||
return invoice
|
|
@ -0,0 +1,58 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part sale_shop module for 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="print_sale_by_supplier_start_view_form">
|
||||
<field name="model">sale_shop.sale_by_supplier.start</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">sale_by_supplier_start_form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.wizard" id="wizard_print_sale_by_supplier">
|
||||
<field name="name">Sale By Supplier</field>
|
||||
<field name="wiz_name">sale_shop.print_sale_by_supplier</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.report" id="report_sale_by_supplier">
|
||||
<field name="name">Report Sale By Supplier</field>
|
||||
<field name="model"></field>
|
||||
<field name="report_name">sale_shop.sale_by_supplier_report</field>
|
||||
<field name="report">sale_shop/sale_by_supplier.ods</field>
|
||||
</record>
|
||||
|
||||
<menuitem parent="sale.menu_reporting" sequence="100"
|
||||
action="wizard_print_sale_by_supplier" id="menu_sale_by_supplier_report"/>
|
||||
|
||||
<record model="ir.ui.view" id="sale_view_form">
|
||||
<field name="model">sale.sale</field>
|
||||
<field name="type" eval="None"/>
|
||||
<field name="inherit" ref="sale.sale_view_form"/>
|
||||
<field name="name">sale_form</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="sale_view_tree">
|
||||
<field name="model">sale.sale</field>
|
||||
<field name="type" eval="None"/>
|
||||
<field name="inherit" ref="sale.sale_view_tree"/>
|
||||
<field name="name">sale_tree</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="sale.act_sale_form">
|
||||
<field name="search_value"
|
||||
eval="[('shop', 'ilike', Eval('context', {}).get('shop.rec_name', '%'))]"
|
||||
pyson="1"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.rule.group" id="rule_group_sale">
|
||||
<field name="model" search="[('model', '=', 'sale.sale')]"/>
|
||||
<field name="global_p" eval="True"/>
|
||||
</record>
|
||||
<record model="ir.rule" id="rule_sale1">
|
||||
<field name="domain"
|
||||
eval="[('shop', 'in', Eval('user', {}).get('shops', []))]"
|
||||
pyson="1"/>
|
||||
<field name="rule_group" ref="rule_group_sale"/>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
Binary file not shown.
|
@ -0,0 +1,131 @@
|
|||
#!/usr/bin/env python
|
||||
# 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 setuptools import setup
|
||||
import re
|
||||
import os
|
||||
import io
|
||||
try:
|
||||
from configparser import ConfigParser
|
||||
except ImportError:
|
||||
from ConfigParser import ConfigParser
|
||||
|
||||
MODULE = 'sale_shop'
|
||||
PREFIX = 'trytonpsk'
|
||||
MODULE2PREFIX = {}
|
||||
|
||||
|
||||
def read(fname):
|
||||
return io.open(
|
||||
os.path.join(os.path.dirname(__file__), fname),
|
||||
'r', encoding='utf-8').read()
|
||||
|
||||
|
||||
def get_require_version(name):
|
||||
if minor_version % 2:
|
||||
require = '%s >= %s.%s.dev0, < %s.%s'
|
||||
else:
|
||||
require = '%s >= %s.%s, < %s.%s'
|
||||
require %= (name, major_version, minor_version,
|
||||
major_version, minor_version + 1)
|
||||
return require
|
||||
|
||||
config = ConfigParser()
|
||||
config.readfp(open('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 = '%s_%s' % (PREFIX, MODULE)
|
||||
|
||||
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))
|
||||
|
||||
requires = ['python-sql >= 0.4']
|
||||
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:
|
||||
# Add development index for testing with proteus
|
||||
dependency_links.append('https://trydevpi.tryton.org/')
|
||||
|
||||
setup(name=name,
|
||||
version=version,
|
||||
description='Tryton module that add shop model for sales.',
|
||||
long_description=read('README'),
|
||||
author='Presik Technologies',
|
||||
author_email='gerente@presik.com',
|
||||
url='http://www.presik.com/',
|
||||
download_url="https://bitbucket.org/presik/%s" % name,
|
||||
keywords='tryton %s' % MODULE,
|
||||
package_dir={'trytond.modules.%s' % MODULE: '.'},
|
||||
packages=[
|
||||
'trytond.modules.%s' % MODULE,
|
||||
'trytond.modules.%s.tests' % MODULE,
|
||||
],
|
||||
package_data={
|
||||
'trytond.modules.%s' % MODULE: (info.get('xml', [])
|
||||
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.odt', '*.ods']),
|
||||
},
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Environment :: Plugins',
|
||||
'Framework :: Tryton',
|
||||
'Intended Audience :: Developers',
|
||||
'Intended Audience :: Financial and Insurance Industry',
|
||||
'Intended Audience :: Legal Industry',
|
||||
'License :: OSI Approved :: GNU General Public License (GPL)',
|
||||
'Natural Language :: Bulgarian',
|
||||
'Natural Language :: Catalan',
|
||||
'Natural Language :: Chinese (Simplified)',
|
||||
'Natural Language :: Czech',
|
||||
'Natural Language :: Dutch',
|
||||
'Natural Language :: English',
|
||||
'Natural Language :: French',
|
||||
'Natural Language :: German',
|
||||
'Natural Language :: Hungarian',
|
||||
'Natural Language :: Italian',
|
||||
'Natural Language :: Portuguese (Brazilian)',
|
||||
'Natural Language :: Russian',
|
||||
'Natural Language :: Slovenian',
|
||||
'Natural Language :: Spanish',
|
||||
'Operating System :: OS Independent',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3.3',
|
||||
'Programming Language :: Python :: 3.4',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: Implementation :: CPython',
|
||||
'Programming Language :: Python :: Implementation :: PyPy',
|
||||
'Topic :: Office/Business',
|
||||
'Topic :: Office/Business :: Financial :: Accounting',
|
||||
],
|
||||
license='GPL-3',
|
||||
install_requires=None,
|
||||
dependency_links=dependency_links,
|
||||
zip_safe=False,
|
||||
entry_points="""
|
||||
[trytond.modules]
|
||||
%s = trytond.modules.%s
|
||||
""" % (MODULE, MODULE),
|
||||
test_suite='tests',
|
||||
test_loader='trytond.test_loader:Loader',
|
||||
tests_require=tests_require,
|
||||
use_2to3=True,
|
||||
convert_2to3_doctests=[
|
||||
'tests/scenario.rst',
|
||||
],
|
||||
)
|
|
@ -0,0 +1,119 @@
|
|||
# This file is part sale_shop module for Tryton.
|
||||
# The COPYRIGHT file at the top level of this repository contains
|
||||
# the full copyright notices and license terms.
|
||||
from trytond.model import ModelView, ModelSQL, fields
|
||||
from trytond.pyson import If, Eval, Bool
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.pool import Pool
|
||||
from trytond import backend
|
||||
|
||||
__all__ = ['SaleShop', 'SaleShopResUser']
|
||||
|
||||
|
||||
class SaleShop(ModelSQL, ModelView):
|
||||
'Sale Shop'
|
||||
__name__ = 'sale.shop'
|
||||
|
||||
name = fields.Char('Shop Name', required=True, select=True)
|
||||
users = fields.Many2Many('sale.shop-res.user', 'shop', 'user', 'Users')
|
||||
address = fields.Many2One('party.address', 'Address', domain=[
|
||||
('party', '=', Eval('company_party')),
|
||||
], depends=['company_party'])
|
||||
warehouse = fields.Many2One('stock.location', "Warehouse", required=True,
|
||||
domain=[('type', '=', 'warehouse')])
|
||||
currency = fields.Many2One('currency.currency', 'Currency', required=True)
|
||||
price_list = fields.Many2One('product.price_list', 'Pricelist',
|
||||
required=True)
|
||||
payment_term = fields.Many2One('account.invoice.payment_term',
|
||||
'Payment Term', required=True)
|
||||
sale_sequence = fields.Many2One('ir.sequence',
|
||||
'Sale Reference Sequence', domain=[
|
||||
('company', 'in', [Eval('context', {}).get('company', 0),
|
||||
None]),
|
||||
('code', '=', 'sale.sale'),
|
||||
], required=True)
|
||||
sale_invoice_method = fields.Selection([
|
||||
('manual', 'Manual'),
|
||||
('order', 'On Order Processed'),
|
||||
('shipment', 'On Shipment Sent')
|
||||
], 'Sale Invoice Method', states={
|
||||
'required': Bool(Eval('context', {}).get('company', 0)),
|
||||
})
|
||||
sale_shipment_method = fields.Selection([
|
||||
('manual', 'Manual'),
|
||||
('order', 'On Order Processed'),
|
||||
('invoice', 'On Invoice Paid'),
|
||||
], 'Sale Shipment Method', states={
|
||||
'required': Bool(Eval('context', {}).get('company', 0)),
|
||||
})
|
||||
company = fields.Many2One('company.company', 'Company', required=True,
|
||||
domain=[], select=True)
|
||||
company_party = fields.Function(fields.Many2One('party.party',
|
||||
'Company Party'),
|
||||
'on_change_with_company_party')
|
||||
active = fields.Boolean('Active', select=True)
|
||||
sale_return_sequence = fields.Many2One('ir.sequence',
|
||||
'Sale Return Sequence', domain=[
|
||||
('company', 'in',
|
||||
[Eval('context', {}).get('company', -1), None]),
|
||||
('code', '=', 'sale.sale'),
|
||||
], required=True)
|
||||
|
||||
@classmethod
|
||||
def __register__(cls, module_name):
|
||||
pool = Pool()
|
||||
TableHandler = backend.get('TableHandler')
|
||||
Company = pool.get('company.company')
|
||||
shop_table = cls.__table__()
|
||||
company_table = Company.__table__()
|
||||
|
||||
super(SaleShop, cls).__register__(module_name)
|
||||
cursor = Transaction().connection.cursor()
|
||||
is_sqlite = 'backend.sqlite.table.TableHandler' in str(TableHandler)
|
||||
if not is_sqlite:
|
||||
# SQLite doesn't support this query as it generates and update
|
||||
# with an alias (AS) which is not valid on SQLite
|
||||
query = shop_table.update(columns=[shop_table.currency],
|
||||
values=[company_table.currency],
|
||||
from_=[company_table],
|
||||
where=((shop_table.company == company_table.id)
|
||||
& (shop_table.currency == None)))
|
||||
cursor.execute(*query)
|
||||
|
||||
# @staticmethod
|
||||
# def default_currency():
|
||||
# pool = Pool()
|
||||
# Company = pool.get('company.company')
|
||||
# Shop = pool.get('sale.shop')
|
||||
#
|
||||
# company_id = Shop.default_company()
|
||||
# return company_id and Company(company_id).currency.id or None
|
||||
|
||||
@staticmethod
|
||||
def default_active():
|
||||
return True
|
||||
|
||||
@staticmethod
|
||||
def sale_configuration():
|
||||
Config = Pool().get('sale.configuration')
|
||||
config = Config(1)
|
||||
return config
|
||||
|
||||
@fields.depends('company')
|
||||
def on_change_with_company_party(self, name=None):
|
||||
Company = Pool().get('company.company')
|
||||
company = self.company
|
||||
if not company:
|
||||
company = Company(SaleShop.default_company())
|
||||
return company and company.party.id or None
|
||||
|
||||
|
||||
class SaleShopResUser(ModelSQL):
|
||||
'Sale Shop - Res User'
|
||||
__name__ = 'sale.shop-res.user'
|
||||
_table = 'sale_shop_res_user'
|
||||
|
||||
shop = fields.Many2One('sale.shop', 'Shop', ondelete='CASCADE',
|
||||
select=True, required=True)
|
||||
user = fields.Many2One('res.user', 'User', ondelete='RESTRICT',
|
||||
required=True)
|
|
@ -0,0 +1,55 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part sale_shop module for 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="sale_shop_view_form">
|
||||
<field name="model">sale.shop</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">sale_shop_form</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="sale_shop_view_tree">
|
||||
<field name="model">sale.shop</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="name">sale_shop_tree</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_sale_shop_form">
|
||||
<field name="name">Shops</field>
|
||||
<field name="res_model">sale.shop</field>
|
||||
<field name="domain"
|
||||
eval="[('company', '=', Eval('context', {}).get('company', -1))]"
|
||||
pyson="1"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_sale_shop_form_view1">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="sale_shop_view_tree"/>
|
||||
<field name="act_window" ref="act_sale_shop_form"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_sale_shop_form_view2">
|
||||
<field name="sequence" eval="20"/>
|
||||
<field name="view" ref="sale_shop_view_form"/>
|
||||
<field name="act_window" ref="act_sale_shop_form"/>
|
||||
</record>
|
||||
<menuitem parent="sale.menu_configuration"
|
||||
action="act_sale_shop_form"
|
||||
id="menu_sale_shop" icon="tryton-list"/>
|
||||
|
||||
<!-- Security -->
|
||||
<record model="ir.model.access" id="access_sale_shop">
|
||||
<field name="model" search="[('model', '=', 'sale.shop')]"/>
|
||||
<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_sale_shop_admin">
|
||||
<field name="model" search="[('model', '=', 'sale.shop')]"/>
|
||||
<field name="group" ref="sale.group_sale_admin"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="True"/>
|
||||
<field name="perm_create" eval="True"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
|
@ -0,0 +1,79 @@
|
|||
# This file is part sale_shop module for Tryton.
|
||||
# The COPYRIGHT file at the top level of this repository contains the full
|
||||
# copyright notices and license terms.
|
||||
from trytond.model import fields
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.pyson import Eval
|
||||
|
||||
__all__ = ['ShipmentOut', 'ShipmentOutReturn']
|
||||
|
||||
|
||||
class ShipmentOut(metaclass=PoolMeta):
|
||||
__name__ = 'stock.shipment.out'
|
||||
|
||||
shop_addresses = fields.Function(fields.Many2Many('party.address', None,
|
||||
None, 'Shop Addresses'),
|
||||
'on_change_with_shop_addresses')
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super(ShipmentOut, cls).__setup__()
|
||||
delivery_addr_domain = cls.delivery_address.domain[:]
|
||||
if delivery_addr_domain:
|
||||
cls.delivery_address.domain = [
|
||||
'OR',
|
||||
delivery_addr_domain,
|
||||
[('id', 'in', Eval('shop_addresses'))],
|
||||
]
|
||||
else:
|
||||
cls.delivery_address.domain = [
|
||||
('id', 'in', Eval('shop_addresses')),
|
||||
]
|
||||
if 'shop_addresses' not in cls.delivery_address.depends:
|
||||
cls.delivery_address.depends.append('shop_addresses')
|
||||
|
||||
@fields.depends('warehouse')
|
||||
def on_change_with_shop_addresses(self, name=None):
|
||||
Shop = Pool().get('sale.shop')
|
||||
if not self.warehouse:
|
||||
return []
|
||||
warehouse_shops = Shop.search([
|
||||
('warehouse', '=', self.warehouse.id),
|
||||
])
|
||||
return [s.address.id for s in warehouse_shops if s.address]
|
||||
|
||||
|
||||
class ShipmentOutReturn:
|
||||
__metaclass__ = PoolMeta
|
||||
__name__ = 'stock.shipment.out.return'
|
||||
|
||||
shop_addresses = fields.Function(fields.Many2Many('party.address', None,
|
||||
None, 'Shop Addresses'),
|
||||
'on_change_with_shop_addresses')
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super(ShipmentOutReturn, cls).__setup__()
|
||||
delivery_addr_domain = cls.delivery_address.domain[:]
|
||||
if delivery_addr_domain:
|
||||
cls.delivery_address.domain = [
|
||||
'OR',
|
||||
delivery_addr_domain,
|
||||
[('id', 'in', Eval('shop_addresses'))],
|
||||
]
|
||||
else:
|
||||
cls.delivery_address.domain = [
|
||||
('id', 'in', Eval('shop_addresses')),
|
||||
]
|
||||
if 'shop_addresses' not in cls.delivery_address.depends:
|
||||
cls.delivery_address.depends.append('shop_addresses')
|
||||
|
||||
@fields.depends('warehouse')
|
||||
def on_change_with_shop_addresses(self, name=None):
|
||||
Shop = Pool().get('sale.shop')
|
||||
if not self.warehouse:
|
||||
return []
|
||||
warehouse_shops = Shop.search([
|
||||
('warehouse', '=', self.warehouse.id),
|
||||
])
|
||||
return [s.address.id for s in warehouse_shops if s.address]
|
|
@ -0,0 +1,7 @@
|
|||
#This file is part sale_shop module for Tryton.
|
||||
#The COPYRIGHT file at the top level of this repository contains
|
||||
#the full copyright notices and license terms.
|
||||
|
||||
from .test_sale_shop import suite
|
||||
|
||||
__all__ = ['suite']
|
|
@ -0,0 +1,179 @@
|
|||
==================
|
||||
Sale Shop Scenario
|
||||
==================
|
||||
|
||||
Imports::
|
||||
|
||||
>>> import datetime
|
||||
>>> from dateutil.relativedelta import relativedelta
|
||||
>>> from decimal import Decimal
|
||||
>>> from operator import attrgetter
|
||||
>>> from proteus import config, Model, Wizard
|
||||
>>> from trytond.modules.company.tests.tools import create_company, \
|
||||
... get_company
|
||||
>>> from trytond.modules.account.tests.tools import create_fiscalyear, \
|
||||
... create_chart, get_accounts, create_tax
|
||||
>>> from.trytond.modules.account_invoice.tests.tools import \
|
||||
... set_fiscalyear_invoice_sequences, create_payment_term
|
||||
>>> today = datetime.date.today()
|
||||
|
||||
Create database::
|
||||
|
||||
>>> config = config.set_trytond()
|
||||
>>> config.pool.test = True
|
||||
|
||||
Install sale::
|
||||
|
||||
>>> Module = Model.get('ir.module')
|
||||
>>> sale_shop_module, = Module.find([('name', '=', 'sale_shop')])
|
||||
>>> Module.install([sale_shop_module.id], config.context)
|
||||
>>> Wizard('ir.module.install_upgrade').execute('upgrade')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Reload the context::
|
||||
|
||||
>>> User = Model.get('res.user')
|
||||
>>> config._context = User.get_preferences(True, config.context)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company))
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> revenue = accounts['revenue']
|
||||
>>> expense = accounts['expense']
|
||||
>>> cash = accounts['cash']
|
||||
|
||||
>>> Journal = Model.get('account.journal')
|
||||
>>> cash_journal, = Journal.find([('type', '=', 'cash')])
|
||||
>>> cash_journal.credit_account = cash
|
||||
>>> cash_journal.debit_account = cash
|
||||
>>> cash_journal.save()
|
||||
|
||||
Create tax::
|
||||
|
||||
>>> tax = create_tax(Decimal('.10'))
|
||||
>>> tax.save()
|
||||
|
||||
Create parties::
|
||||
|
||||
>>> Party = Model.get('party.party')
|
||||
>>> supplier = Party(name='Supplier')
|
||||
>>> supplier.save()
|
||||
>>> customer = Party(name='Customer')
|
||||
>>> customer.save()
|
||||
|
||||
Create category::
|
||||
|
||||
>>> ProductCategory = Model.get('product.category')
|
||||
>>> category = ProductCategory(name='Category')
|
||||
>>> category.save()
|
||||
|
||||
Create product::
|
||||
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
|
||||
>>> ProductTemplate = Model.get('product.template')
|
||||
>>> Product = Model.get('product.product')
|
||||
>>> product = Product()
|
||||
>>> template = ProductTemplate()
|
||||
>>> template.name = 'product'
|
||||
>>> template.default_uom = unit
|
||||
>>> template.type = 'goods'
|
||||
>>> template.list_price = Decimal('40')
|
||||
>>> template.cost_price = Decimal('25')
|
||||
>>> template.account_expense = expense
|
||||
>>> template.account_revenue = revenue
|
||||
>>> template.salable = True
|
||||
>>> template.customer_taxes.append(tax)
|
||||
>>> template.save()
|
||||
>>> product.template = template
|
||||
>>> product.save()
|
||||
|
||||
Create payment term::
|
||||
|
||||
>>> payment_term = create_payment_term()
|
||||
>>> payment_term.save()
|
||||
|
||||
Create an Inventory::
|
||||
|
||||
>>> Inventory = Model.get('stock.inventory')
|
||||
>>> InventoryLine = Model.get('stock.inventory.line')
|
||||
>>> Location = Model.get('stock.location')
|
||||
>>> storage, = Location.find([
|
||||
... ('code', '=', 'STO'),
|
||||
... ])
|
||||
>>> inventory = Inventory()
|
||||
>>> inventory.location = storage
|
||||
>>> inventory.save()
|
||||
>>> inventory_line = InventoryLine(product=product, inventory=inventory)
|
||||
>>> inventory_line.quantity = 100.0
|
||||
>>> inventory_line.expected_quantity = 0.0
|
||||
>>> inventory.save()
|
||||
>>> inventory_line.save()
|
||||
>>> Inventory.confirm([inventory.id], config.context)
|
||||
>>> inventory.state
|
||||
u'done'
|
||||
|
||||
Create Product Price List::
|
||||
|
||||
>>> ProductPriceList = Model.get('product.price_list')
|
||||
>>> product_price_list = ProductPriceList()
|
||||
>>> product_price_list.name = 'Price List'
|
||||
>>> product_price_list.company = company
|
||||
>>> product_price_list.save()
|
||||
|
||||
Create Sale Shop::
|
||||
|
||||
>>> Shop = Model.get('sale.shop')
|
||||
>>> Sequence = Model.get('ir.sequence')
|
||||
>>> Location = Model.get('stock.location')
|
||||
>>> shop = Shop()
|
||||
>>> shop.name = 'Sale Shop'
|
||||
>>> warehouse, = Location.find([
|
||||
... ('type', '=', 'warehouse'),
|
||||
... ])
|
||||
>>> shop.warehouse = warehouse
|
||||
>>> shop.price_list = product_price_list
|
||||
>>> shop.payment_term = payment_term
|
||||
>>> sequence, = Sequence.find([
|
||||
... ('code', '=', 'sale.sale'),
|
||||
... ])
|
||||
>>> shop.sale_sequence = sequence
|
||||
>>> shop.sale_invoice_method = 'shipment'
|
||||
>>> shop.sale_shipment_method = 'order'
|
||||
>>> shop.save()
|
||||
|
||||
Save Sale Shop User::
|
||||
|
||||
>>> user, = User.find([])
|
||||
>>> user.shops.append(shop)
|
||||
>>> user.shop = shop
|
||||
>>> user.save()
|
||||
|
||||
Sale 5 products::
|
||||
|
||||
>>> Sale = Model.get('sale.sale')
|
||||
>>> SaleLine = Model.get('sale.line')
|
||||
>>> sale = Sale()
|
||||
>>> sale.party = customer
|
||||
>>> sale.payment_term = payment_term
|
||||
>>> sale.invoice_method = 'shipment'
|
||||
>>> sale_line = SaleLine()
|
||||
>>> sale.lines.append(sale_line)
|
||||
>>> sale_line.product = product
|
||||
>>> sale_line.quantity = 2.0
|
||||
>>> sale_line = SaleLine()
|
||||
>>> sale.lines.append(sale_line)
|
||||
>>> sale_line.product = product
|
||||
>>> sale_line.quantity = 3.0
|
||||
>>> sale.save()
|
|
@ -0,0 +1,26 @@
|
|||
# This file is part of the sale_shop module for Tryton.
|
||||
# The COPYRIGHT file at the top level of this repository contains the full
|
||||
# copyright notices and license terms.
|
||||
import unittest
|
||||
import doctest
|
||||
import trytond.tests.test_tryton
|
||||
from trytond.tests.test_tryton import ModuleTestCase
|
||||
from trytond.tests.test_tryton import doctest_setup, doctest_teardown
|
||||
from trytond.tests.test_tryton import doctest_checker
|
||||
|
||||
|
||||
class SaleShopTestCase(ModuleTestCase):
|
||||
'Test Sale Shop module'
|
||||
module = 'sale_shop'
|
||||
|
||||
|
||||
def suite():
|
||||
suite = trytond.tests.test_tryton.suite()
|
||||
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
|
||||
SaleShopTestCase))
|
||||
suite.addTests(doctest.DocFileSuite(
|
||||
'scenario_sale_shop.rst',
|
||||
setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
|
||||
checker=doctest_checker,
|
||||
optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
|
||||
return suite
|
|
@ -0,0 +1,17 @@
|
|||
[tox]
|
||||
envlist = {py27,py33,py34,py35}-{sqlite,postgresql,mysql},pypy-{sqlite,postgresql}
|
||||
|
||||
[testenv]
|
||||
commands = {envpython} setup.py test
|
||||
deps =
|
||||
{py27,py33,py34,py35}-postgresql: psycopg2 >= 2.5
|
||||
pypy-postgresql: psycopg2cffi >= 2.5
|
||||
mysql: MySQL-python
|
||||
setenv =
|
||||
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
|
||||
postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://}
|
||||
mysql: TRYTOND_DATABASE_URI={env:MYSQL_URI:mysql://}
|
||||
sqlite: DB_NAME={env:SQLITE_NAME::memory:}
|
||||
postgresql: DB_NAME={env:POSTGRESQL_NAME:test}
|
||||
mysql: DB_NAME={env:MYSQL_NAME:test}
|
||||
install_command = pip install --pre --find-links https://trydevpi.tryton.org/ {opts} {packages}
|
|
@ -0,0 +1,12 @@
|
|||
[tryton]
|
||||
version=5.0.1
|
||||
depends:
|
||||
ir
|
||||
account_invoice
|
||||
sale_price_list
|
||||
xml:
|
||||
configuration.xml
|
||||
shop.xml
|
||||
user.xml
|
||||
sale.xml
|
||||
invoice.xml
|
|
@ -0,0 +1,33 @@
|
|||
# This file is part sale_shop module for 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.pyson import Eval
|
||||
from trytond.pool import PoolMeta
|
||||
|
||||
__all__ = ['User']
|
||||
|
||||
|
||||
class User(metaclass=PoolMeta):
|
||||
__name__ = "res.user"
|
||||
shops = fields.Many2Many('sale.shop-res.user', 'user', 'shop', 'Shops',
|
||||
domain=[])
|
||||
shop = fields.Many2One('sale.shop', 'Shop', domain=[
|
||||
('id', 'in', Eval('shops', [])),
|
||||
], depends=['shops'])
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super(User, cls).__setup__()
|
||||
cls._preferences_fields.extend([
|
||||
'shop',
|
||||
'shops',
|
||||
])
|
||||
cls._context_fields.insert(0, 'shop')
|
||||
cls._context_fields.insert(0, 'shops')
|
||||
|
||||
def get_status_bar(self, name):
|
||||
status = super(User, self).get_status_bar(name)
|
||||
if self.shop:
|
||||
status += ' - %s' % (self.shop.rec_name)
|
||||
return status
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part sale_shop module for 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>
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- The COPYRIGHT file at the top level of this repository contains the full
|
||||
copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="/form/field[@name='sale_sequence']" position="after">
|
||||
<label name="default_invoice_type"/>
|
||||
<field name="default_invoice_type"/>
|
||||
<label name="default_description"/>
|
||||
<field name="default_description"/>
|
||||
<label name="cache_products_local"/>
|
||||
<field name="cache_products_local"/>
|
||||
<label name="use_description_product"/>
|
||||
<field name="use_description_product"/>
|
||||
</xpath>
|
||||
</data>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="/form/notebook/page[@id='info']/field[@name='move']"
|
||||
position="after">
|
||||
<label name="shop"/>
|
||||
<field name="shop"/>
|
||||
</xpath>
|
||||
</data>
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<form>
|
||||
<label name="supplier"/>
|
||||
<field name="supplier"/>
|
||||
<label name="start_date"/>
|
||||
<field name="start_date"/>
|
||||
<label name="end_date"/>
|
||||
<field name="end_date"/>
|
||||
<label name="brand"/>
|
||||
<field name="brand"/>
|
||||
</form>
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<form>
|
||||
<label name="supplier"/>
|
||||
<field name="supplier"/>
|
||||
<label name="company"/>
|
||||
<field name="company"/>
|
||||
<label name="start_date"/>
|
||||
<field name="start_date"/>
|
||||
<label name="end_date"/>
|
||||
<field name="end_date"/>
|
||||
</form>
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part sale_shop module for Tryton.
|
||||
The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath
|
||||
expr="/form/notebook/page[@id='other']/field[@name='company']"
|
||||
position="after">
|
||||
<label name="shop"/>
|
||||
<field name="shop"/>
|
||||
</xpath>
|
||||
</data>
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part sale_shop module for Tryton.
|
||||
The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
|
||||
<form>
|
||||
<label name="name"/>
|
||||
<field name="name"/>
|
||||
<label name="active"/>
|
||||
<field name="active"/>
|
||||
<label name="company"/>
|
||||
<field name="company"/>
|
||||
<label name="address"/>
|
||||
<field name="address"/>
|
||||
<notebook colspan="4">
|
||||
<page string="General" id="general">
|
||||
<label name="sale_sequence"/>
|
||||
<field name="sale_sequence"/>
|
||||
<label name="sale_return_sequence"/>
|
||||
<field name="sale_return_sequence"/>
|
||||
<label name="sale_invoice_method" />
|
||||
<field name="sale_invoice_method" />
|
||||
<label name="sale_shipment_method" />
|
||||
<field name="sale_shipment_method" />
|
||||
<label name="currency"/>
|
||||
<field name="currency"/>
|
||||
<label name="price_list"/>
|
||||
<field name="price_list"/>
|
||||
<label name="payment_term"/>
|
||||
<field name="payment_term"/>
|
||||
<label name="warehouse"/>
|
||||
<field name="warehouse"/>
|
||||
</page>
|
||||
<page string="Users" id="users">
|
||||
<field name="users"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part sale_shop module for Tryton.
|
||||
The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
|
||||
<tree >
|
||||
<field name="name"/>
|
||||
<field name="warehouse"/>
|
||||
<field name="currency"/>
|
||||
<field name="company"/>
|
||||
<field name="active" tree_invisible="1"/>
|
||||
</tree>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part sale_shop module for Tryton.
|
||||
The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath
|
||||
expr="/tree/field[@name='reference']" position="before">
|
||||
<field name="shop"/>
|
||||
</xpath>
|
||||
</data>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of the sale_shop module for Tryton. The COPYRIGHT file
|
||||
at the top level of this repository contains the full copyright notices and
|
||||
license terms. -->
|
||||
<data>
|
||||
<xpath
|
||||
expr="/form/notebook/page[@id='preferences']/field[@name='language']"
|
||||
position="after">
|
||||
<label name="shop"/>
|
||||
<field name="shop" widget="selection"/>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="/form/notebook/page[@id='preferences']"
|
||||
position="after">
|
||||
<page string="Shops" col="2" id="shops">
|
||||
<field name="shops"/>
|
||||
</page>
|
||||
</xpath>
|
||||
</data>
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of the sale_shop module for Tryton. The COPYRIGHT file
|
||||
at the top level of this repository contains the full copyright notices and
|
||||
license terms. -->
|
||||
<data>
|
||||
<xpath
|
||||
expr="/form/notebook/page[@id='preferences']/field[@name='language']"
|
||||
position="after">
|
||||
<label name="shop"/>
|
||||
<field name="shop" widget="selection"/>
|
||||
</xpath>
|
||||
</data>
|
Loading…
Reference in New Issue