I’m learning Tryton and use an association I’m benevolent in as an example on how to use it in real life.
The association is what we call in France a “recyclerie” or “ressourcerie” which is a place where people give objects that they don’t want anymore or that are broken.
We then repair them and sell them in a store.
Right now, there is no stock management, we just weigh the objects that enters and weigh the one we sell.
The important thing here is the weight. We may have a real stock in the future, but not now.
What I want to do, is create some “generic” product (or product template) called like “books”, “furnitures” and be able to create sale with them and specify for each sale a specific weight.
I don’t want to specify the weight in the product because, it will be a generic product.
For example, I want to be able to create a sale for a “table” of 20kg, and I want to create a sale with the product “furniture”, set quantity to 1 (we sell by units) and add another element to the sale which is the weight.
Is this something doable in Tryton ?
Of course, we could create a specific product for each item we received and specify a weight on it (with the product_measurement module) but it will increase the complexity of our workflow (will need a computer where we receive the item etc.)
After more thought, maybe the best should be to consider all the items as if it were resource manage in kilograms, so instead of create a new object for each new item we could only add kg to a generic object.
Example : we could have a “Book” product, when receiving a box of books, we add 10kg to the “Book” product in stock. And then when we sell book, we sell by kg. The only problem is that we can’t use a calculation like Unitary Price * weight. Because there is no “unitary price”. A book might be sold to 50 cents or to 5€ depending on the type of the book which we don’t want to handle.
So is there a way to define a total price for a product in sale, specify the quantity in kg but no unitary price ? Or can the unitary price be calculated based on the total price ?
I’m not sure if my questions make sense, if not, please forgive me and I can explain myself further.
I think the sale_secondary_unit could be easily customize to show the secondary_uom_factor on the sale line. So you could change the default value from the product to the actual value of the object sold.
Thanks for the reply. I’ve been playing a bit with sale_secondary_unit, but I don’t think it will work, since the secondary unit needs a factor link to the first unit.
In our case, it won’t work because there is no direct link between the two units.
And if we have to change at each sales the factor, it will be overkill. Having two unit wont help, user will have to calculate the factor as it could calculate the unit price based on the weight. So maybe the best idea is to offer a simple interface (like the one you have on cash register) which automatically calculate the price per kg based on the final price.
Will it be “good” solution or is it too “hacky” ? I don’t mind doing hacky things, just wonder if there will be another way more “trytonish” ?