first commit

This commit is contained in:
root
2026-03-14 09:42:12 +00:00
commit 0adbd20c2c
10991 changed files with 1646955 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.

View File

@@ -0,0 +1,46 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr ""
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr ""
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr ""
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr ""
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr ""
#, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr ""
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr "Stock Location Movable"
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr ""

View File

@@ -0,0 +1,46 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr "Reservat per"
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr "Movible"
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr "Ubicacions"
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr "Ubicació"
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr "Albarà"
#, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr "La ubicació '%(location)s' ja està reservada per '%(assigned_by)s'."
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr "Ubicació movible"
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr "Qualsevol ubicació"
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr "Ubicacions d'existències movibles"
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr "Albarà intern - Ubicació"

View File

@@ -0,0 +1,46 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr ""
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr ""
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr ""
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr ""
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr ""
#, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr ""
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr "Stock Location Movable"
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr ""

View File

@@ -0,0 +1,46 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr "Zugeordnet"
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr "Beweglich"
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr "Lagerorte"
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr "Lagerort"
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr "Lieferung"
#, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr "Der Lagerort '%(location)s' ist bereits '%(assigned_by)s' zugeordnet."
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr "Mobiler Lagerort"
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr "Beliebiger Lagerort"
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr "Mobiler Lagerort"
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr "Interne Lieferung - Lagerort"

View File

@@ -0,0 +1,46 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr "Reservador por"
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr "Movible"
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr "Ubicaciones"
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr "Ubicación"
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr "Albarán"
#, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr "La ubicación '%(location)s' ya está reservada por '%(assigned_by)s'."
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr "Ubicación movible"
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr "Cualquier ubicación"
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr "Ubicaciones de existencias movibles"
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr "Albarán interno - Ubicación"

View File

@@ -0,0 +1,46 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr ""
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr ""
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr ""
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr ""
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr ""
#, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr ""
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr ""
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr ""

View File

@@ -0,0 +1,46 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr "Määratud"
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr "Liigutatav"
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr "Asukohad"
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr "Asukoht"
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr "Lähetus"
#, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr ""
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr ""
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr ""

View File

@@ -0,0 +1,47 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr "اختصاص داده شده توسط"
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr "قابل جابجایی"
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr "مکان ها"
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr "مکان"
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr "محموله"
#, fuzzy, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr "مکان : \"%s\" در حال حاضر توسط : \"%s\" اختصاص داده شده است."
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr ""
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr "مکان موجودی قابل جابجایی"
#, fuzzy
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr "مکان - محموله داخلی"

View File

@@ -0,0 +1,46 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr ""
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr ""
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr ""
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr ""
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr ""
#, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr ""
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr "Stock Location Movable"
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr ""

View File

@@ -0,0 +1,47 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr "Assigné par"
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr "Mobile"
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr "Emplacements"
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr "Emplacement"
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr "Expédition"
#, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr ""
"L'emplacement « %(location)s » a déjà été assigné par « %(assigned_by)s »."
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr "Emplacement déplaçable"
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr "N'importe quel emplacement"
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr "Emplacement de stockage déplaçable"
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr "Expédition interne de stock - Emplacement"

View File

@@ -0,0 +1,46 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr ""
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr ""
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr ""
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr ""
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr ""
#, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr ""
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr "Stock Location Movable"
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr ""

View File

@@ -0,0 +1,46 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr ""
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr ""
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr ""
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr "Lokasi"
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr ""
#, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr ""
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr ""
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr ""

View File

@@ -0,0 +1,47 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr "Assegnato da"
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr "Mobiliare"
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr "Luoghi"
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr "Luogo"
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr "Spedizione"
#, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr "Il luogo \"%(location)s\" è già stata assegnata da \"%(assigned_by)s\"."
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr "Luogo mobile"
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr "Qualsiasi luogo"
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr "Luogo di stock mobiliare"
#, fuzzy
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr "Spedizione interna - Ubicazione"

View File

@@ -0,0 +1,46 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr ""
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr ""
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr ""
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr ""
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr ""
#, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr ""
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr "Stock Location Movable"
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr ""

View File

@@ -0,0 +1,46 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr ""
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr ""
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr ""
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr ""
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr ""
#, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr ""
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr "Stock Location Movable"
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr ""

View File

@@ -0,0 +1,46 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr "Toegekend door"
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr "beweegbaar"
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr "locaties"
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr "locatie"
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr "levering"
#, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr "De locatie \"%(location)s\" is al toegewezen door \"%(assigned_by)s\"."
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr "Beweegbare locatie"
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr "Elke locatie"
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr "voorraad locatie verplaatbaar"
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr "Voorraad interne zending - Locatie"

View File

@@ -0,0 +1,46 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr "Przydzielono przez"
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr ""
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr "Lokalizacje"
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr "Lokalizacja"
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr "Wysyłka"
#, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr ""
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr "Stock Location Movable"
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr ""

View File

@@ -0,0 +1,48 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr "Atribuído por"
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr "Móvel"
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr "Localizações"
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr "Localização"
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr "Remessa"
#, fuzzy, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr "A localização '%(location)s' já foi atribuída por '%(assigned_by)s'."
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr ""
#, fuzzy
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr "Stock Location Movable"
#, fuzzy
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr "Remessa Interna - Localização"

View File

@@ -0,0 +1,46 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr ""
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr ""
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr ""
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr ""
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr ""
#, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr ""
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr ""
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr ""

View File

@@ -0,0 +1,46 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr ""
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr ""
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr ""
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr ""
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr ""
#, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr ""
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr "Stock Location Movable"
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr ""

View File

@@ -0,0 +1,46 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr ""
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr ""
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr ""
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr ""
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr ""
#, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr ""
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr "Stock Location Movable"
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr ""

View File

@@ -0,0 +1,46 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr ""
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr ""
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr ""
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr ""
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr ""
#, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr ""
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr "Stock Location Movable"
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr ""

View File

@@ -0,0 +1,46 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr ""
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr ""
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr ""
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr ""
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr ""
#, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr ""
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr ""
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr ""

View File

@@ -0,0 +1,46 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:stock.location,assigned_by:"
msgid "Assigned by"
msgstr ""
msgctxt "field:stock.location,movable:"
msgid "Movable"
msgstr ""
msgctxt "field:stock.shipment.internal,locations:"
msgid "Locations"
msgstr ""
msgctxt "field:stock.shipment.internal-location,location:"
msgid "Location"
msgstr ""
msgctxt "field:stock.shipment.internal-location,shipment:"
msgid "Shipment"
msgstr ""
#, python-format
msgctxt "model:ir.message,text:msg_location_already_assigned"
msgid ""
"The location \"%(location)s\" has already been assigned by "
"\"%(assigned_by)s\"."
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable"
msgid "Movable location"
msgstr ""
msgctxt "model:ir.rule.group,name:rule_group_location_movable_admin"
msgid "Any location"
msgstr ""
msgctxt "model:res.group,name:group_stock_location_movable"
msgid "Stock Location Movable"
msgstr "Stock Location Movable"
msgctxt "model:stock.shipment.internal-location,string:"
msgid "Stock Shipment Internal - Location"
msgstr ""

View File

@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data grouped="1">
<record model="ir.message" id="msg_location_already_assigned">
<field name="text">The location "%(location)s" has already been assigned by "%(assigned_by)s".</field>
</record>
</data>
</tryton>

View File

@@ -0,0 +1,24 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import datetime
from trytond.pool import Pool, PoolMeta
from trytond.transaction import Transaction
class Product(metaclass=PoolMeta):
__name__ = 'product.product'
@classmethod
def products_by_location(cls, *args, **kwargs):
pool = Pool()
Location = pool.get('stock.location')
context = Transaction().context
forecast_location_move = context.get('forecast_location_move', False)
if forecast_location_move:
date = context.get('stock_date_end') or datetime.date.max
restore = Location.forecast_location_move(date)
quantities = super().products_by_location(*args, **kwargs)
if forecast_location_move:
restore()
return quantities

View File

@@ -0,0 +1,267 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import functools
from trytond.i18n import gettext
from trytond.model import ModelSQL, ModelView, Workflow, fields
from trytond.modules.stock.exceptions import AssignError
from trytond.pool import Pool, PoolMeta
from trytond.pyson import Eval, If
from trytond.transaction import Transaction
class Location(metaclass=PoolMeta):
__name__ = 'stock.location'
movable = fields.Boolean(
"Movable",
states={
'invisible': Eval('type') != 'storage',
})
assigned_by = fields.Reference(
"Assigned by", 'get_assigned_by', readonly=True)
@classmethod
def _get_assigned_by(cls):
"Return list of Model names for assigned_by Reference"
return ['stock.shipment.internal', 'stock.shipment.out']
@classmethod
def get_assigned_by(cls):
pool = Pool()
IrModel = pool.get('ir.model')
get_name = IrModel.get_name
models = cls._get_assigned_by()
return [(None, '')] + [(m, get_name(m)) for m in models]
@classmethod
def deactivate_empty(cls, locations=None):
if locations is None:
locations = cls.search([
('movable', '=', True),
])
to_deactivate = cls.get_empty_locations(locations)
if to_deactivate:
cls.write(cls.browse(to_deactivate), {'active': False})
@classmethod
def forecast_location_move(cls, date):
"""Move temporary locations planned for the date
and returns a method to restore the initial parent."""
pool = Pool()
ShipmentInternal = pool.get('stock.shipment.internal')
Location = pool.get('stock.location')
Date = pool.get('ir.date')
today = Date.today()
shipments = ShipmentInternal.search([
('locations', '!=', None),
('state', 'not in', ['cancelled', 'done']),
['OR', [
('planned_date', '<=', date),
('planned_date', '>=', today),
('effective_date', '=', None),
], [
('effective_date', '<=', date),
('effective_date', '>=', today),
],
],
],
order=[('planned_date', 'ASC'), ('id', 'ASC')])
location_parents = {}
locations = []
for shipment in shipments:
for location in shipment.locations:
location_parents.setdefault(location, location.parent)
location.parent = shipment.to_location
locations.append(location)
Location.save(locations)
def restore():
locations = []
for location, parent in location_parents.items():
location.parent = parent
locations.append(location)
Location.save(locations)
return restore
def clear_location_assignation(func):
@functools.wraps(func)
def wrapper(cls, shipments, *args, **kwargs):
pool = Pool()
Location = pool.get('stock.location')
locations = []
for shipment in shipments:
for location in shipment.locations:
if location.assigned_by == shipment:
locations.append(location)
Location.write(locations, {'assigned_by': None})
return func(cls, shipments, *args, **kwargs)
return wrapper
class ShipmentInternal(metaclass=PoolMeta):
__name__ = 'stock.shipment.internal'
locations = fields.Many2Many(
'stock.shipment.internal-location', 'shipment', 'location',
"Locations",
domain=[
('type', '=', 'storage'),
('movable', '=', True),
If(Eval('state') == 'assigned',
('parent', 'child_of', Eval('from_location', -1)),
()),
],
states={
'readonly': (~Eval('state').in_(['request', 'draft'])
| ~Eval('from_location') | ~Eval('to_location')),
})
@classmethod
@ModelView.button
@Workflow.transition('draft')
@clear_location_assignation
def draft(cls, shipments):
super().draft(shipments)
@classmethod
@ModelView.button
@Workflow.transition('waiting')
@clear_location_assignation
def wait(cls, shipments):
super().wait(shipments)
@classmethod
@Workflow.transition('assigned')
def assign(cls, shipments):
pool = Pool()
Location = pool.get('stock.location')
locations = {}
for shipment in shipments:
for location in shipment.locations:
if not location.assigned_by:
location.assigned_by = shipment
if location in locations:
raise AssignError(
gettext('stock_location_move'
'.msg_location_already_assigned') % {
'location': location.rec_name,
'assigned_by': locations[location].rec_name,
})
locations[location] = location.assigned_by
elif location.assigned_by != shipment:
raise AssignError(
gettext('stock_location_move'
'.msg_location_already_assigned') % {
'location': location.rec_name,
'assigned_by': location.assigned_by.rec_name,
})
if locations:
Location.save(list(locations))
super().assign(shipments)
@classmethod
@ModelView.button
@Workflow.transition('shipped')
def ship(cls, shipments):
pool = Pool()
Location = pool.get('stock.location')
to_write = []
for shipment in shipments:
if not shipment.transit_location or not shipment.locations:
continue
to_write.append(list(shipment.locations))
to_write.append({
'parent': shipment.transit_location.id,
})
if to_write:
Location.write(*to_write)
super().ship(shipments)
@classmethod
@ModelView.button
@Workflow.transition('done')
@clear_location_assignation
def do(cls, shipments):
pool = Pool()
Location = pool.get('stock.location')
to_write = []
for shipment in shipments:
if not shipment.locations:
continue
to_write.append(list(shipment.locations))
to_write.append({
'parent': shipment.to_location.id,
})
if to_write:
Location.write(*to_write)
super().do(shipments)
@classmethod
@ModelView.button
@Workflow.transition('cancelled')
@clear_location_assignation
def cancel(cls, shipments):
super().cancel(shipments)
class ShipmentInternal_Location(ModelSQL):
__name__ = 'stock.shipment.internal-location'
shipment = fields.Many2One(
'stock.shipment.internal', "Shipment", required=True)
location = fields.Many2One(
'stock.location', "Location", required=True,
domain=[
('type', '=', 'storage'),
('movable', '=', True),
])
def deactivate_empty_location(func):
@functools.wraps(func)
def wrapper(cls, shipments, *args, **kwargs):
pool = Pool()
Location = pool.get('stock.location')
result = func(cls, shipments, *args, **kwargs)
locations = set()
for shipment in shipments:
locations.update(
move.from_location for move in shipment.moves
if move.from_location.movable)
Location.deactivate_empty(list(locations))
return result
return wrapper
class ShipmentOut(metaclass=PoolMeta):
__name__ = 'stock.shipment.out'
@classmethod
@ModelView.button
@Workflow.transition('done')
@deactivate_empty_location
def do(cls, shipments):
super().do(shipments)
class ShipmentInReturn(metaclass=PoolMeta):
__name__ = 'stock.shipment.in.return'
@classmethod
@ModelView.button
@Workflow.transition('done')
@deactivate_empty_location
def do(cls, shipments):
super().do(shipments)
class Supply(metaclass=PoolMeta):
__name__ = 'stock.supply'
def transition_create_(self):
with Transaction().set_context(forecast_location_move=True):
return super().transition_create_()

View File

@@ -0,0 +1,72 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="res.group" id="group_stock_location_movable">
<field name="name">Stock Location Movable</field>
</record>
<record model="res.user-res.group"
id="user_admin_group_stock_location_movable">
<field name="user" ref="res.user_admin"/>
<field name="group" ref="group_stock_location_movable"/>
</record>
<record model="ir.model.access" id="access_location">
<field name="model">stock.location</field>
<field name="group" ref="group_stock_location_movable"/>
<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>
<record model="ir.rule.group" id="rule_group_location_movable">
<field name="name">Movable location</field>
<field name="model">stock.location</field>
<field name="global_p" eval="False"/>
<field name="default_p" eval="False"/>
<field name="perm_read" eval="False"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.rule" id="rule_location_movable">
<field name="domain" eval="[('movable', '=', True)]" pyson="1"/>
<field name="rule_group" ref="rule_group_location_movable"/>
</record>
<record model="ir.rule.group-res.group"
id="rule_group_location_movable_group_stock_location_movable">
<field name="rule_group" ref="rule_group_location_movable"/>
<field name="group" ref="group_stock_location_movable"/>
</record>
<record model="ir.rule.group" id="rule_group_location_movable_admin">
<field name="name">Any location</field>
<field name="model">stock.location</field>
<field name="global_p" eval="False"/>
<field name="default_p" eval="False"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="True"/>
</record>
<record model="ir.rule.group-res.group"
id="rule_group_location_movable_admin_group_stock_admin">
<field name="rule_group" ref="rule_group_location_movable_admin"/>
<field name="group" ref="stock.group_stock_admin"/>
</record>
<record model="ir.ui.view" id="location_view_form">
<field name="model">stock.location</field>
<field name="inherit" ref="stock.location_view_form"/>
<field name="name">location_form</field>
</record>
<record model="ir.ui.view" id="shipment_internal_view_form">
<field name="model">stock.shipment.internal</field>
<field name="inherit" ref="stock.shipment_internal_view_form"/>
<field name="name">shipment_internal_form</field>
</record>
</data>
</tryton>

View File

@@ -0,0 +1,2 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.

View File

@@ -0,0 +1,121 @@
============================
Stock Location Move Scenario
============================
Imports::
>>> import datetime as dt
>>> from proteus import Model
>>> from trytond.modules.company.tests.tools import create_company
>>> from trytond.tests.tools import activate_modules, assertEqual
>>> today = dt.date.today()
>>> tomorrow = today + dt.timedelta(1)
Activate modules::
>>> config = activate_modules('stock_location_move', create_company)
Get stock locations::
>>> Location = Model.get('stock.location')
>>> storage_loc, = Location.find([('code', '=', 'STO')])
>>> storage1 = Location(name="Storage 1", parent=storage_loc)
>>> storage1.save()
>>> storage2 = Location(name="Storage 2", parent=storage_loc)
>>> storage2.save()
>>> pallet = Location(name="Pallet", parent=storage1, movable=True)
>>> pallet.save()
Move pallet from storage1 to storage2::
>>> Shipment = Model.get('stock.shipment.internal')
>>> shipment = Shipment()
>>> shipment.from_location = storage1
>>> shipment.to_location = storage2
>>> shipment.locations.append(Location(pallet.id))
>>> shipment.click('wait')
>>> shipment.click('assign_try')
>>> shipment.state
'assigned'
>>> pallet.reload()
>>> assertEqual(pallet.assigned_by, shipment)
>>> assertEqual(pallet.parent, storage1)
>>> shipment.click('do')
>>> shipment.state
'done'
>>> pallet.reload()
>>> pallet.assigned_by
>>> assertEqual(pallet.parent, storage2)
Assign pallet from wrong location::
>>> shipment = Shipment()
>>> shipment.from_location = storage1
>>> shipment.to_location = storage2
>>> shipment.locations.append(Location(pallet.id))
>>> shipment.click('wait')
>>> shipment.click('assign_try')
Traceback (most recent call last):
...
DomainValidationError: ...
Concurrently move pallet::
>>> shipment1 = Shipment()
>>> shipment1.from_location = storage2
>>> shipment1.to_location = storage1
>>> shipment1.locations.append(Location(pallet.id))
>>> shipment1.click('wait')
>>> shipment2 = Shipment()
>>> shipment2.from_location = storage2
>>> shipment2.to_location = storage1
>>> shipment2.locations.append(Location(pallet.id))
>>> shipment2.click('wait')
>>> shipment1.click('assign_try')
>>> shipment1.state
'assigned'
>>> shipment2.click('assign_try')
Traceback (most recent call last):
...
AssignError: ...
>>> shipment1.click('do')
Add lead time between warehouses::
>>> warehouse1 = storage_loc.warehouse
>>> warehouse2, = warehouse1.duplicate()
>>> LeadTime = Model.get('stock.location.lead_time')
>>> lead_time = LeadTime()
>>> lead_time.warehouse_from = warehouse1
>>> lead_time.warehouse_to = warehouse2
>>> lead_time.lead_time = dt.timedelta(1)
>>> lead_time.save()
Move pallet from storage1 to storage2 with lead_time::
>>> Shipment = Model.get('stock.shipment.internal')
>>> shipment = Shipment()
>>> shipment.planned_date = tomorrow
>>> shipment.from_location = warehouse1.storage_location
>>> shipment.to_location = warehouse2.storage_location
>>> shipment.locations.append(Location(pallet.id))
>>> shipment.click('wait')
>>> shipment.click('assign_try')
>>> shipment.click('pack')
>>> shipment.click('ship')
>>> shipment.state
'shipped'
>>> pallet.reload()
>>> assertEqual(pallet.parent, shipment.transit_location)
>>> shipment.click('do')
>>> pallet.reload()
>>> assertEqual(pallet.parent, warehouse2.storage_location)

View File

@@ -0,0 +1,160 @@
==================================
Stock Location Move Empty Scenario
==================================
Imports::
>>> import datetime as dt
>>> from decimal import Decimal
>>> from proteus import Model
>>> from trytond.modules.company.tests.tools import create_company, get_company
>>> from trytond.tests.tools import activate_modules
>>> today = dt.date.today()
>>> yesterday = today - dt.timedelta(1)
>>> tomorrow = today + dt.timedelta(1)
Activate modules::
>>> config = activate_modules('stock_location_move', create_company)
Get company::
>>> company = get_company()
Create customer::
>>> Party = Model.get('party.party')
>>> customer = Party(name='Customer')
>>> customer.save()
Get stock locations::
>>> Location = Model.get('stock.location')
>>> warehouse_loc, = Location.find([('code', '=', 'WH')])
>>> supplier_loc, = Location.find([('code', '=', 'SUP')])
>>> customer_loc, = Location.find([('code', '=', 'CUS')])
>>> output_loc, = Location.find([('code', '=', 'OUT')])
>>> storage_loc, = Location.find([('code', '=', 'STO')])
>>> storage1 = Location(name="Storage 1", parent=storage_loc)
>>> storage1.save()
>>> pallet1 = Location(name="Pallet 1", parent=storage_loc, movable=True)
>>> pallet1.save()
>>> pallet2 = Location(name="Pallet 2", parent=storage_loc, movable=True)
>>> pallet2.save()
>>> pallet3 = Location(name="Pallet 3", parent=storage_loc, movable=True)
>>> pallet3.save()
Create products::
>>> ProductUom = Model.get('product.uom')
>>> ProductTemplate = Model.get('product.template')
>>> Product = Model.get('product.product')
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
>>> template = ProductTemplate()
>>> template.name = 'Product'
>>> template.default_uom = unit
>>> template.type = 'goods'
>>> template.list_price = Decimal(0)
>>> template.save()
>>> product1 = Product()
>>> product1.template = template
>>> product1.save()
>>> product2 = Product()
>>> product2.template = template
>>> product2.save()
>>> product3 = Product()
>>> product3.template = template
>>> product3.save()
Fill storage locations::
>>> StockMove = Model.get('stock.move')
>>> incoming_move = StockMove()
>>> incoming_move.product = product1
>>> incoming_move.quantity = 1
>>> incoming_move.unit_price = Decimal('0')
>>> incoming_move.currency = company.currency
>>> incoming_move.from_location = supplier_loc
>>> incoming_move.to_location = storage1
>>> incoming_move.effective_date = yesterday
>>> incoming_move.click('do')
>>> incoming_move = StockMove()
>>> incoming_move.product = product2
>>> incoming_move.quantity = 1
>>> incoming_move.unit_price = Decimal('0')
>>> incoming_move.currency = company.currency
>>> incoming_move.from_location = supplier_loc
>>> incoming_move.to_location = pallet1
>>> incoming_move.effective_date = yesterday
>>> incoming_move.click('do')
>>> incoming_move = StockMove()
>>> incoming_move.product = product3
>>> incoming_move.quantity = 2
>>> incoming_move.unit_price = Decimal('0')
>>> incoming_move.currency = company.currency
>>> incoming_move.from_location = supplier_loc
>>> incoming_move.to_location = pallet2
>>> incoming_move.effective_date = yesterday
>>> incoming_move.click('do')
Ship 1 product from the locations::
>>> ShipmentOut = Model.get('stock.shipment.out')
>>> shipment = ShipmentOut()
>>> shipment.customer = customer
>>> shipment.warehouse = warehouse_loc
>>> move = shipment.outgoing_moves.new()
>>> move.product = product1
>>> move.quantity = 1
>>> move.unit_price = Decimal('0')
>>> move.currency = company.currency
>>> move.from_location = output_loc
>>> move.to_location = customer_loc
>>> move = shipment.outgoing_moves.new()
>>> move.product = product2
>>> move.quantity = 1
>>> move.unit_price = Decimal('0')
>>> move.currency = company.currency
>>> move.from_location = output_loc
>>> move.to_location = customer_loc
>>> move = shipment.outgoing_moves.new()
>>> move.product = product3
>>> move.quantity = 1
>>> move.unit_price = Decimal('0')
>>> move.currency = company.currency
>>> move.from_location = output_loc
>>> move.to_location = customer_loc
>>> shipment.click('wait')
>>> shipment.click('assign_try')
>>> shipment.click('pick')
>>> shipment.click('pack')
>>> shipment.click('do')
Check empty non movable location are still active::
>>> storage1.reload()
>>> bool(storage1.active)
True
Check empty location are deactivated::
>>> pallet1.reload()
>>> bool(pallet1.active)
False
Check non empty location are still active::
>>> pallet2.reload()
>>> bool(pallet2.active)
True
Check non changed empty location are still active::
>>> pallet3.reload()
>>> bool(pallet3.active)
True

View File

@@ -0,0 +1,108 @@
==========================
Stock Location Move Supply
==========================
Imports::
>>> import datetime as dt
>>> from decimal import Decimal
>>> from proteus import Model, Wizard
>>> from trytond.modules.company.tests.tools import create_company
>>> from trytond.tests.tools import activate_modules
>>> today = dt.date.today()
Activate modules::
>>> config = activate_modules(
... ['stock_location_move', 'stock_supply'],
... create_company)
Create customer::
>>> Party = Model.get('party.party')
>>> customer = Party(name='Customer')
>>> customer.save()
Get stock locations::
>>> Location = Model.get('stock.location')
>>> warehouse_loc, = Location.find([('code', '=', 'WH')])
>>> supplier_loc, = Location.find([('code', '=', 'SUP')])
>>> customer_loc, = Location.find([('code', '=', 'CUS')])
>>> output_loc, = Location.find([('code', '=', 'OUT')])
>>> storage_loc, = Location.find([('code', '=', 'STO')])
>>> provisioning_loc = Location(
... name="Provisioning Location", parent=warehouse_loc)
>>> provisioning_loc.save()
>>> pallet = Location(name="Pallet", parent=provisioning_loc, movable=True)
>>> pallet.save()
Create products::
>>> ProductUom = Model.get('product.uom')
>>> ProductTemplate = Model.get('product.template')
>>> Product = Model.get('product.product')
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
>>> template = ProductTemplate()
>>> template.name = 'Product'
>>> template.default_uom = unit
>>> template.type = 'goods'
>>> template.list_price = Decimal(0)
>>> template.save()
>>> product = Product()
>>> product.template = template
>>> product.save()
Create internal order point::
>>> OrderPoint = Model.get('stock.order_point')
>>> order_point = OrderPoint()
>>> order_point.product = product
>>> order_point.location = storage_loc
>>> order_point.provisioning_location = provisioning_loc
>>> order_point.type = 'internal'
>>> order_point.min_quantity = 2
>>> order_point.target_quantity = 2
>>> order_point.save()
Fill pallet::
>>> Inventory = Model.get('stock.inventory')
>>> inventory = Inventory()
>>> inventory.location = pallet
>>> inventory_line = inventory.lines.new(product=product)
>>> inventory_line.quantity = 1
>>> inventory.click('confirm')
Plan moving pallet::
>>> ShipmentInternal = Model.get('stock.shipment.internal')
>>> shipment = ShipmentInternal()
>>> shipment.planned_date = today
>>> shipment.from_location = provisioning_loc
>>> shipment.to_location = storage_loc
>>> shipment.locations.append(Location(pallet.id))
>>> shipment.save()
Execute internal supply::
>>> Wizard('stock.supply').execute('create_')
Only 1 product is requested::
>>> shipment, = ShipmentInternal.find([
... ('id', '!=', shipment.id),
... ])
>>> shipment.state
'request'
>>> move, = shipment.moves
>>> move.quantity
1.0
Pallet did not moved::
>>> pallet.reload()
>>> pallet.parent.name
'Provisioning Location'

View File

@@ -0,0 +1,13 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.tests.test_tryton import ModuleTestCase
class StockLocationMoveTestCase(ModuleTestCase):
'Test Stock Location Move module'
module = 'stock_location_move'
extras = ['stock_supply']
del ModuleTestCase

View File

@@ -0,0 +1,8 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.tests.test_tryton import load_doc_tests
def load_tests(*args, **kwargs):
return load_doc_tests(__name__, __file__, *args, **kwargs)

View File

@@ -0,0 +1,23 @@
[tryton]
version=7.8.0
depends:
ir
stock
extras_depend:
stock_supply
xml:
stock.xml
message.xml
[register]
model:
product.Product
stock.Location
stock.ShipmentInternal
stock.ShipmentInternal_Location
stock.ShipmentOut
stock.ShipmentInReturn
[register stock_supply]
wizard:
stock.Supply

View File

@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="/form/field[@name='flat_childs']" position="after">
<label name="movable"/>
<field name="movable"/>
</xpath>
</data>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="/form/notebook/page[@id='other']" position="before">
<page name="locations">
<field name="locations" colspan="4"/>
</page>
</xpath>
</data>