Tryton - Issues

 

Issue6825

Title Missing rounding of unit price computed by promotion
Priority bug Status resolved
Superseder Nosy List ced, reviewbot, roundup-bot, semarie
Type crash Components sale_promotion
Assigned To ced Keywords review
Reviews 40741002
View: 40741002

Created on 2017-10-06.11:03:47 by ced, last changed by roundup-bot.

Messages
New changeset c51eebb3f580 by Cédric Krier in branch 'default':
Add rounding on new unit price
http://hg.tryton.org/modules/sale_promotion/rev/c51eebb3f580
msg36138 (view) Author: [hidden] (semarie) Date: 2017-10-08.07:14:40
tested on sale_promotion 4.4, with promotion formule: "unit_price / 1.06" (6% reduction)

before: an error occurs at quotation transition: "Le nombre de décimales « 4 » du champ « Prix unitaire » pour « Decimal('1.226415094339622641509433962') » dépasse sa limite."

after: the price is correctly rounded.

a workaround was possible with promotion formule like: "Decimal(unit_price / 1.06).quantize(Decimal('.0001'))"
review40741002 updated at https://codereview.tryton.org/40741002/#ps1
msg36103 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-10-06.11:03:47
Depending of the formula, the result may have too much decimal for a unit price, so it must be rounded.
History
Date User Action Args
2017-10-13 23:34:54roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg36281
2017-10-08 07:14:40semariesetnosy: + semarie
messages: + msg36138
2017-10-06 11:11:33reviewbotsetnosy: + reviewbot
messages: + msg36104
2017-10-06 11:05:31cedsetstatus: in-progress -> testing
reviews: 40741002
keyword: + review
2017-10-06 11:03:47cedcreate

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