Tryton - Issues

 

Issue8119

Title Unit price on Outgoing move does not bring price list from sale line origin
Priority bug Status resolved
Superseder Nosy List ced, lukio, reviewbot, roundup-bot
Type behavior Components stock
Assigned To ced Keywords review
Reviews 255251002
View: 255251002

Created on 2019-02-15.15:51:59 by lukio, last changed by roundup-bot.

Messages
New changeset fea41fdc721f by Cédric Krier in branch 'default':
Don't set default unit price on stock move
https://hg.tryton.org/tryton-env/rev/fea41fdc721f
New changeset 1727a3e6a9a2 by Cédric Krier in branch 'default':
Don't set default unit price on stock move
https://hg.tryton.org/modules/stock_supply/rev/1727a3e6a9a2
New changeset 0699d763518c by Cédric Krier in branch 'default':
Don't set default unit price on stock move
https://hg.tryton.org/modules/stock_lot_unit/rev/0699d763518c
New changeset 9e58b923752e by Cédric Krier in branch 'default':
Don't set default unit price on stock move
https://hg.tryton.org/modules/stock_location_move/rev/9e58b923752e
New changeset 23cf8d3c4d2d by Cédric Krier in branch 'default':
Don't set default unit price on stock move
https://hg.tryton.org/modules/stock_consignment/rev/23cf8d3c4d2d
New changeset 11a985b94085 by Cédric Krier in branch 'default':
Don't set default unit price on stock move
https://hg.tryton.org/modules/stock/rev/11a985b94085
New changeset 222a169cbc18 by Cédric Krier in branch 'default':
Don't set default unit price on stock move
https://hg.tryton.org/modules/purchase_shipment_cost/rev/222a169cbc18
New changeset e37a9b4fa925 by Cédric Krier in branch 'default':
Don't set default unit price on stock move
https://hg.tryton.org/modules/carrier_weight/rev/e37a9b4fa925
New changeset e867d2a35b6f by Cédric Krier in branch 'default':
Don't set default unit price on stock move
https://hg.tryton.org/modules/carrier_percentage/rev/e867d2a35b6f
review255251002 updated at https://codereview.tryton.org/255251002/#ps255291002
msg48797 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-04-10.12:54:43
In last patch version, I opted to make the unit price required for consignment move only when the origin is set. And to fill it with the price of the invoice line created.
review255251002 updated at https://codereview.tryton.org/255251002/#ps265271002
msg48594 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-04-07.16:28:52
My only concern is for the stock_consignment module. It compute the unit price for the invoice line using Product.get_purchase_price and Product.get_sale_price. But I'm wondering if it should not just take the unit_price filled on the move.
msg48593 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-04-07.16:23:19
Here is review255251002
msg48587 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-04-06.18:41:29
Indeed just like we removed the filling on unit price on invoice (issue4857). The stock move should not set any unit price.
msg47057 (view) Author: [hidden] (lukio) Date: 2019-02-15.15:51:59
The idea is that the outgoing move is created from a sale that has a sale price list assigned.

When the outgoing move is at waiting state, the user can change the product, and set another one, or set the product again.  The unit price at the outgoing move model is changed and we bring the information from the list price of the product.

The outgoing move has a sale origin, which we know the sale price list of this product. I think we should set the unit_price of the outgoing move from there instead of the list_price of the product.

How to reproduce:

1. Create a Price Lists.
2. Assign Price List to a party
3. Create a Sale to this party
4. Add a product which has price list pattern.
5. Process the sale to create the Outgoing moves.
6. Edit outgoing move
6.1 Remove the product and set it again. 

The unit_price of the Outgoing Move is changed and the information is set from the list price of product instead of the sale price list.
History
Date User Action Args
2019-04-23 09:11:13roundup-botsetmessages: + msg49153
2019-04-23 09:11:09roundup-botsetmessages: + msg49152
2019-04-23 09:11:05roundup-botsetmessages: + msg49151
2019-04-23 09:11:02roundup-botsetmessages: + msg49150
2019-04-23 09:10:59roundup-botsetmessages: + msg49149
2019-04-23 09:10:57roundup-botsetmessages: + msg49148
2019-04-23 09:10:53roundup-botsetmessages: + msg49147
2019-04-23 09:10:48roundup-botsetmessages: + msg49146
2019-04-23 09:10:43roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg49145
2019-04-10 13:14:54reviewbotsetmessages: + msg48798
2019-04-10 12:54:43cedsetmessages: + msg48797
2019-04-07 16:45:40reviewbotsetnosy: + reviewbot
messages: + msg48595
2019-04-07 16:28:52cedsetmessages: + msg48594
2019-04-07 16:23:19cedsetstatus: in-progress -> testing
reviews: 255251002
messages: + msg48593
keyword: + review
2019-04-06 18:41:29cedsetstatus: unread -> in-progress
assignedto: ced
component: - sale_price_list
messages: + msg48587
nosy: + ced
2019-02-15 15:51:59lukiocreate