• Romain Courteaud's avatar
    slapos_accounting: stop generating a single open sale order per user · 7c2d5b43
    Romain Courteaud authored
    Instead of having a giant versionned Open Sale Order, containing all user
    subscriptions, create one Open Sale Order per subscription.
    The Open Order state can now be used to mark the subscription status.
    
    This reduce the simulation tree size, as a such tree will not be
    updated anymore when a subscription ends.
    
    The Open Order stop date is set when closing the Open Order.
    
    Create a new 'automated' ledger category, to explicitely mark the
    deliveries managed by the alarms / scripts.
    Drop the explicit reference of a specific business process / trade condition,
    and allow any Trade Condition to be used, based on its predicate/trade_condition_type configuration.
    
    Ensure the items are propagated in the simulation movements and delivery lines.
    
    Aggregate Sale Invoices, based on their Trade Condition and profile values.
    A user will have multiple invoices if he is using multiple virtual master's services.
    
    Implement a VAT calculation for France only for now.
    Delivery Line with a taxable business_contribution must trigger the
    tax calculation script (which depends on many factors like type of sold items, customer address, ...)
    and explicitely mark on the line the VAT rate.
    Customer address can be modified in futur, without impacting the delivery
    vat calculation.
    
    Also in this commit:
    * drop template usages
    * use interaction workflow to trigger alarms
    * do not generate invoice with a 0 total price
    * drop hardcoded reference of hardcoded currencies
    * add contraints on the simulation logic, to prevent generating wrong movements
    * configure Sale Supply to allow more complex price definitions
    * allow using any kind of resource on the deliveries
    * disable consumption delivery generation (until better specified)
    * stop forcing/hardcoding payment mode in advance
    * support for variated resources
    * allow to manually pay multiple invoices with a single payment
    * drop the cloud contract tricks
    * destroy items as soon as the Open Order is closed
    * add a discount service to reduce the invoice price if wanted
    * add a deposit service to support invoice prepayment
    7c2d5b43
specialise_arity_constraint_constraint.xml 2.64 KB