Files
tryton/__init__.py
T
Cédric Krier cd8fd31d0b Add moves for product quantities by warehouse
We add a new model based on stock move that compute the cumulative quantity for
each incoming or outgoing move.
The product quantities by warehouse is refined to only get row at the date the
quantity actually change.
We also add company and access rules for both models.
On back-end without window function, the cumulative quantity is the initial
quantity of the day.

issue9389
review297881002
2020-07-04 23:46:35 +02:00

77 lines
2.3 KiB
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 trytond.pool import Pool
from . import location
from . import shipment
from . import period
from . import move
from . import product
from . import inventory
from . import configuration
from . import party
from . import ir
from . import res
from .move import StockMixin
__all__ = ['StockMixin', 'register']
def register():
Pool.register(
location.Location,
location.Party,
location.PartyLocation,
location.ProductsByLocationsContext,
location.LocationLeadTime,
move.Move,
shipment.ShipmentIn,
shipment.ShipmentInReturn,
shipment.ShipmentOut,
shipment.ShipmentOutReturn,
shipment.AssignShipmentOutAssignFailed,
shipment.ShipmentInternal,
shipment.Address,
shipment.AssignShipmentInternalAssignFailed,
shipment.AssignShipmentInReturnAssignFailed,
period.Period,
period.Cache,
product.Template,
product.Product,
product.ProductByLocationContext,
product.ProductQuantitiesByWarehouse,
product.ProductQuantitiesByWarehouseContext,
product.ProductQuantitiesByWarehouseMove,
product.RecomputeCostPriceStart,
product.CostPriceRevision,
product.ModifyCostPriceStart,
inventory.Inventory,
inventory.InventoryLine,
inventory.CountSearch,
inventory.CountQuantity,
configuration.Configuration,
configuration.ConfigurationSequence,
configuration.ConfigurationLocation,
ir.Cron,
res.User,
module='stock', type_='model')
Pool.register(
shipment.AssignShipmentOut,
shipment.AssignShipmentInternal,
shipment.AssignShipmentInReturn,
product.OpenProductQuantitiesByWarehouse,
product.RecomputeCostPrice,
product.ModifyCostPrice,
inventory.Count,
party.Replace,
party.Erase,
module='stock', type_='wizard')
Pool.register(
shipment.DeliveryNote,
shipment.PickingList,
shipment.SupplierRestockingList,
shipment.CustomerReturnRestockingList,
shipment.InteralShipmentReport,
module='stock', type_='report')