Hi,

I need to add a new feature to tryton.  I will describe the motivation, what
tryton does now, the design for the new feature and then ask for feedback.

Motivation

I have a business scenario where a customer must receive a discount when
they return types of containers our business can re-use.

Our company sells plants(like Flowers/Trees/Shrubs) in plastic containers.
It is cheaper for us to re-use containers then to buy new containers.  A
parallel in another industry might be the return of milk bottles to the
milkman so that they can be cleaned and then used again to deliver milk.

Current Behaviour

I have tried to model this in Tryton by entering negative quantities into
lines of a sale.  The total appears correct in the sale screen but no
accounting moves are made to keep track of the reduced total.  Also for
stockable products no inventory moves are made to keep track of returned
products.

Design

I have written the following pseudo-code, based on a suggestion from Cédric
Krier, in order to express the basic idea:

When the sale is changed to confirmed then
    For all sale lines that contain strictly negative quantities
        Generate a credit note mirroring negative sale lines.
        Generate a return shipment that includes all products with their
quantities which are stockable

Questions/Concerns/Suggestions

Does anyone else need a feature similar to this?  Has anyone else tried
implementing this?  Do people think this will work with gift certificates as
well?  I don't know much about accounting so Gift Certificates might need a
lot of extra functionality with regards to accounting.

-- 
tryton@googlegroups.com mailing list

Reply via email to