When the shipment cost method is by order, the sold shipment cost is dispatched between shipments once the sale is shipped. The amount is stored on the shipment for each sale (in case the shipments have been grouped) and deduced from the shipment cost when it is set on the stock moves. Closes #12506
31 lines
869 B
Python
31 lines
869 B
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 account, party, sale, stock
|
|
from .stock import ShipmentCostSaleMixin
|
|
|
|
__all__ = ['register', 'ShipmentCostSaleMixin']
|
|
|
|
|
|
def register():
|
|
Pool.register(
|
|
party.Party,
|
|
party.PartySaleMethod,
|
|
account.InvoiceLine,
|
|
sale.Configuration,
|
|
sale.ConfigurationSaleMethod,
|
|
sale.Sale,
|
|
sale.Line,
|
|
stock.ShipmentCostSale,
|
|
stock.ShipmentOut,
|
|
module='sale_shipment_cost', type_='model')
|
|
Pool.register(
|
|
sale.Promotion,
|
|
module='sale_shipment_cost', type_='model',
|
|
depends=['sale_promotion'])
|
|
Pool.register(
|
|
sale.ReturnSale,
|
|
module='sale_shipment_cost', type_='wizard')
|