Tryton - Issues

 

Issue8079

Title Uom in opportunity line is updated when creating the sale
Priority bug Status chatting
Superseder Nosy List mrichez, pokoli
Type behavior Components sale_opportunity
Assigned To Keywords
Reviews

Created on 2019-02-06.10:42:34 by mrichez, last changed by mrichez.

Messages
msg46777 (view) Author: [hidden] (mrichez) Date: 2019-02-06.13:33:31
>So you enter 1000kg as it is what you will sell on the sale. 
That's what we do actually :-)
But you have to convert and knowing the factor between units. And it seems weird for to customer when you send him an offer with a quantity and a uom totally different.

> Tryton is not able to convert between uoms of diferent categories.
Indeed but it would be a nice feature :-)
msg46775 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-02-06.13:25:32
> Indeed, setting a domain on the category unit of the product default_uom seems more logical.
> But sometimes, and i think i could be the case in opportunity where you could switch from uom category. I mean you could offer your product with quantity in 'unit' even if your product is stored in Kg or the inverse. The customer requesting something doesn't know your storage uom...so he asks with the uom he wish.. 'Give me price for 10000 units of ...' 'Sorry our storage uom is in Kg'

So you enter 1000kg as it is what you will sell on the sale. 


> This would imply to have a secondary uom and a convert factor between uom from different categories...

Tryton is not able to convert between uoms of diferent categories.
msg46773 (view) Author: [hidden] (mrichez) Date: 2019-02-06.13:16:18
Indeed, setting a domain on the category unit of the product default_uom seems more logical.
But sometimes, and i think i could be the case in opportunity where you could switch from uom category. I mean you could offer your product with quantity in 'unit' even if your product is stored in Kg or the inverse. The customer requesting something doesn't know your storage uom...so he asks with the uom he wish.. 'Give me price for 10000 units of ...' 'Sorry our storage uom is in Kg'
This would imply to have a secondary uom and a convert factor between uom from different categories...
msg46769 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-02-06.13:00:10
As product is required on opportunity line I think we should enforce to use only a uom from the product default_uom category. So if product is defined on kg, we can not select Meters nor units

When creating the sale the unit used is the one from on_change_product [1] so that's why it's ignored. I think we should enforce the unit defined on the opportunity line. 

[1] http://hg.tryton.org/modules/sale_opportunity/file/4420dc7c5db3/opportunity.py#l494111
msg46765 (view) Author: [hidden] (mrichez) Date: 2019-02-06.10:42:34
On the sale_opportunity lines, there's no domain on the unit field allowing you to select any unit for a product. 
But when you create a sale for this opportunity, the unit on the sale line will be the product sale unit so your sale could be different of your opportunity if the unit choosen in the opportunity is not the sale unit. 
I mean product A has 'unit' as sale unit but you make an opportunity with product A and 'Kg' as unit and quantity:10. When you create the sale, product 'A' will get 'unit' as uom instead of 'Kg' because 'unit' is the sale_unit. But 10 Kg or 10 unit is totally different...
History
Date User Action Args
2019-02-06 13:33:32mrichezsetmessages: + msg46777
2019-02-06 13:25:32pokolisetmessages: + msg46775
2019-02-06 13:16:18mrichezsetmessages: + msg46773
2019-02-06 13:00:11pokolisetstatus: unread -> chatting
nosy: + pokoli
messages: + msg46769
2019-02-06 10:42:34mrichezcreate

Showing 10 items. Show all history (warning: this could be VERY long)