Tryton - Issues



Title Update custom unit price after on change taxes
Priority feature Status chatting
Superseder Nosy List ced, pokoli, resteve
Type feature request Components sale, sale_price_list
Assigned To Keywords

Created on 2017-10-11.09:29:07 by resteve, last changed by ced.

msg36324 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-10-17.10:15:08
No for two reasons:

- it will make a difficult behaviour to understand for the user
- we can not guess that Product.get_sale_price will only depend on the price list
msg36322 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2017-10-17.09:36:05
IIUC what @resteve tries to explain is that the recomputes of when taxes changes must be only done if the sale_price_list is installed as when no price_list is defined on the sale the unit_price does not depend on the taxes.
msg36321 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-10-17.09:30:26
@resteve: I can not understand you
msg36320 (view) Author: [hidden] (resteve) Date: 2017-10-17.09:26:51
IMHO sale module don't recompute unit price when change taxes, same as isue6837 (purchase module).

To recompute unit price when change taxes is according a sale has a price list and price list is taxes included (sale price list module).
msg36202 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-10-11.10:53:39
But I think for the purchase it is a different answer which is on isue6837
msg36200 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-10-11.10:48:04
I'm wondering if it is even something we want to fix.
Changing the taxes may change the unit price computation so it seems to be the correct behavior.
Also editing the unit price on the sale is a questionable behavior and it should probably be constrained to not diverge too much of the computed value.
Maybe, the behavior could be improved if we store in an hidden field, the computed value and update the unit price if it was not updated. But this behavior can be also astonishing as the current behavior of the description (which will be fixed by issue3797).
Anyway, this is not a bug but the expected behavior.
msg36195 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2017-10-11.09:39:02
So if I understand correctly, what you propose is to only modify unit_price if it's not set, and reset it when the product is removed?
msg36193 (view) Author: [hidden] (resteve) Date: 2017-10-11.09:29:06

- Install sale or purchase modules (I don't install sale price list)
- Create a salable or purchasable product with a tax.
- Create a new sale or purchase
- Add new line:

1- Select a product with tax.
2- Unit price line is the product price.
3- Edit unit price and add a new custom unit price.
3- Change tax line. Unit price is reload from product and you lost the custom price.

See issue4446 - "Price list with tax included" [1]
Date User Action Args
2017-10-17 10:15:08cedsetmessages: + msg36324
2017-10-17 09:36:06pokolisetmessages: + msg36322
2017-10-17 09:30:26cedsetmessages: + msg36321
2017-10-17 09:26:52restevesetcomponent: + sale_price_list
messages: + msg36320
2017-10-11 10:53:40cedsetcomponent: - purchase
messages: + msg36202
2017-10-11 10:48:04cedsetpriority: bug -> feature
nosy: + ced
messages: + msg36200
2017-10-11 09:39:02pokolisetnosy: + pokoli
messages: + msg36195
2017-10-11 09:29:07restevecreate

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