Product Kit Support

Rational

Sometimes companies sell or purchase kit that are composed of multiple products.
Such product can not be managed in Tryton because at the shipment level those kit must be managed by individual components.
Such kit has only meaning for goods (not services). And a kit can not contain goods and services because in most countries the taxes are different.
Another case is to sale a product/service that must always be accompanied by other products (service or goods).

Proposal

We put all the changes into one new module product_kit (which will extras_depend from module sale and purchase).
We define a new type of product kit (this ensures that a kit will not be used in a stock move).
The product has a One2Many of components. For kit type, it is required and all the same type. For other types, it is optional and can have mixed types. A component is defined by:

  • Quantity
  • UoM
  • Product (type = goods or assets)
  • Fixed (boolean): define if the quantity must be multiply or not by the kit quantity.

The quantity fields of the product computes for kits the possible quantity of kit available by checking the quantity of each component.
The cost price of a kit is always computed as the sum of the component cost (The cost price method is always set to fixed).

On sale and purchase line, a copy of the kit components is stored when a product kit is selected (this is to keep the history of the kit once the order is validated).
Such line computes for each component the stock move to create (using same design for exception). The origin of the stock moves are the component line. The unit price of the moves come from the division of the unit price of the kit using the list price of each component as ratio.
The quantity to invoice (based on shipment) is computed by taking the smallest shipped ratio of the component and apply it to the kit quantity (rounded with the UoM).
All the stock moves are linked to the invoice line but the moved_quantity compute the quantity like above.
The accounting properties used are those defined on the product kit (and not from the component, it is the user responsibility to ensure coherence).
The prices are also computed using the product kit properties.

When quoting a sale or purchase with product with component (not kit), we create a new line for each component. Those new lines are linked to the not kit product line. This link is used on quote transition to keep synchronized the quantities.

Implementation

https://bugs.tryton.org/issue9391

When you talk about product do you refer to product.template or product.variant ?

I mean ’product.product like for production (until we have a good design to mix template and product).

i. I think it’s a very good initiative!
Only one detail. A composite article can be formed by Goods or Services.

In my case, for example, a Goods is 1 needle and a Service a visit, a test, … that can be part of the compound.

I can not see how such beast could exist in accounting.
In every country, I have seen that accounting is separating service and goods and taxes are different between goods and service.

For example in my case no!

For me a veterinary service I sell at 21 VAT and an article also

The rate can be the same but the reporting is not. This is standard in all European countries.

What do you mean by reporting?

Tax reporting with the tax code.
In most case, the tax and base amount of VAT on goods or service are reported in different tax code.

I don’t know in other sectors I speak for what affects me. In my case it is simple both a service and a goods can be part of a compound. When making the invoice / sale it must be separated by tax.

So they are not a kit as I said in:

They are two lines on the sale.

In Spain, for example, in the veterinary sector, a service and goods may have the same VAT.

For example:

Name Product Kit: Castration surgery
product 1: anesthesia
product 2: gauze
product 3: castration (it is a service)

the 3 products have a 21

Taxes may be the same but for accouting you should report them in a two diferent accounts: 705 for services and 700 for goods.

For me what you describe is a service product which involves consuming two goods of the warehouse but they are not delivered to the customer.

Well you can see those goods as consumable, in this case their cost will be accounted as general cost for the company.
Or you actually delivery the goods to the customer (even if they are not shipped to the customer but consume in-place) and so you have to invoice them.

I think I could improve the proposal to allow ‘service’ or ‘goods’ to define components. In such case when such product is selected on a sale, this trigger the addition of a line for each component. The quantity are kept in sync and each line has its own price and its own taxes. The components on non-kit product can be of any type (goods or service).

Now about the kit behavior, we need to fill a unit price on the stock move created. I think the best way is to divide the sale unit price base on the list price of each component.

1 Like

That sounds good to me but I’m not sure to understand in which case the a addition of sale lines is triggered. Could you please clarify? Thanks

I think it will be based on on_change_lines. I think it will work a little bit like the shipment cost before this change (or only on quotation) and those added lines will have a link to the main line.

will this work with the scenario in https://discuss.tryton.org/t/purchase-product-kit-asset-goods ?

What I mean if all kits will use the on_change_lines to create compoments lines or only the ones that contain service products?

When all components are goods it makes sense to include only the kit on the purchae/sale (and invoce) line but include all the components on the shipments.

All the component lines but only for product that does not have the type ‘kit’ and have components.

I’m definitely in favor of computing only on quotation for the same reason we did for shipment cost.

This seems better to me! services and goods in the same product kit.

But IMPORTANT a kit can have 2 prices:

Unique price: specified in the generic name of the kit
Sum of products: the sum of all the products that make up the product kit.

In addition, this price must always be modified when making the sale.