Tryton - Issues

 

Issue7855

Title Use sale uom for get_sale_price
Priority feature Status resolved
Superseder Nosy List ced, pokoli, reviewbot, roundup-bot
Type behavior Components sale, sale_price_list
Assigned To ced Keywords review
Reviews 45821002
View: 45821002

Created on 2018-11-12.16:46:02 by ced, last changed by roundup-bot.

Messages
New changeset e45dc443e7f9 by Cédric Krier in branch 'default':
Use sale_uom as fallback uom to compute sale price
https://hg.tryton.org/tryton-env/rev/e45dc443e7f9
New changeset 25c1bb7e01d7 by Cédric Krier in branch 'default':
Use sale_uom as fallback uom to compute sale price
https://hg.tryton.org/modules/sale_price_list/rev/25c1bb7e01d7
New changeset a04f626934c1 by Cédric Krier in branch 'default':
Use sale_uom as fallback uom to compute sale price
https://hg.tryton.org/modules/sale/rev/a04f626934c1
review45821002 updated at https://codereview.tryton.org/45821002/#ps60001
review45821002 updated at https://codereview.tryton.org/45821002/#ps40001
review45821002 updated at https://codereview.tryton.org/45821002/#ps20001
msg44956 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-11-21.09:55:20
Finally, I think we should not change purchase module for two reasons:

- there is a test about the current behavior (so it was the expected behavior since issue3867)
- the purchase uom has not the same value as the sale uom, because when purchasing it is the supplier call to define the uom not really the buyer. More over the purchase uom is just a fallback for when the product supplier does not define one.

In contrary to the sale uom is chosen by the company and this change will allow to compute the sale price for all the products at once with the proper unit.
msg44955 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-11-21.09:44:09
Indeed and the patch is not correct because list price and cost price are always expressed in default uom.
msg44942 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-11-20.12:30:13
Shouldn't we do the same for purchase?
review45821002 updated at https://codereview.tryton.org/45821002/#ps1
msg44856 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-11-12.16:46:01
For me, it is more logical that the method get_sale_price returns the price in sale_uom if not context is given than the default_uom.
History
Date User Action Args
2018-12-22 00:16:40roundup-botsetmessages: + msg45465
2018-12-22 00:16:35roundup-botsetmessages: + msg45464
2018-12-22 00:16:29roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg45463
2018-12-17 23:47:32reviewbotsetmessages: + msg45376
2018-11-21 17:35:55reviewbotsetmessages: + msg44966
2018-11-21 10:16:04reviewbotsetmessages: + msg44957
2018-11-21 09:55:20cedsetcomponent: - purchase
messages: + msg44956
2018-11-21 09:44:09cedsetcomponent: + purchase
messages: + msg44955
2018-11-20 12:30:14pokolisetnosy: + pokoli
messages: + msg44942
2018-11-12 17:06:23reviewbotsetnosy: + reviewbot
messages: + msg44857
2018-11-12 16:47:31cedsetstatus: in-progress -> testing
reviews: 45821002
keyword: + review
2018-11-12 16:46:02cedcreate