Tryton - Issues



Title updating suppliers price in purchase form only works via the suppliers product form
Priority bug Status resolved
Superseder Nosy List ced, risto3
Type behavior Components product
Assigned To Keywords

Created on 2019-01-23.23:38:24 by risto3, last changed by ced.

File name Uploaded Type Edit Remove
Screenshot_2019-01-24.png risto3, 2019-01-24.17:15:04 image/png
msg47696 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-03-17.13:43:42
It could have been fixed by issue7985 but it is not because it is still a One2Many.
But now with issue6799, variant has its own product_suppliers field so it is fully editable.
msg46230 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-01-24.18:18:21
This is because on product variant, the suppliers is a function field that compute values from the template. The field is readonly but client does not make record inside One2Many readonly also readonly (on purpose issue5041). So the client allows modification but they are not saved as the Function field has no setter (which is done also on purpose).
I think a solution would be to display such "inherited" One2Many as Many2Many.
msg46229 (view) Author: [hidden] (risto3) Date: 2019-01-24.17:38:16
I tried again, with sao (both firefox and chromium just to make sure) to no avail
click on product (left side) 'A4 Paper 2500'
in product form displayed, click on Suppliers tab
switch supplier Michael Scott Paper Company to form
switch prices  line to form
change unit price from 3.0000 to 2.5000
save (product form exits)
unit price in purchase line unchanged

doing such via the right side suppliers product does correctly change the unit price
msg46228 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-01-24.17:28:00
Precisely I have no problem.
msg46226 (view) Author: [hidden] (risto3) Date: 2019-01-24.17:04:11
Where do you have problems? Seems clear...
Have you at least found the purchase on demo? I put the issue n° in the description... (supplier as indicated below)
msg46224 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-01-24.16:21:26
I guess your description on how to reproduce is not complete or accurate.
msg46220 (view) Author: [hidden] (risto3) Date: 2019-01-24.15:54:12
strange, I reproduced it on sao *and* gtk client prior to submission using

I just tried again with the same effect. 
I left the purchase in place if you look right now before the base gets reset again...
msg46212 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-01-24.11:34:36
Can not reproduce neither on sao nor tryton.
msg46205 (view) Author: [hidden] (risto3) Date: 2019-01-23.23:38:24
We came across an anomalie in the purchase form....
To make an reproducible example, add Michael Scott Paper company to suppliers on 
for example 'A4 paper 2500' with [initially] a price of 3.00 and save.

Then create a purchase and add a line with this product.
Normally 3.00 will show as the unit price.  Imagine this is wrong and it should be changed to 2.50.

What seems to work is to open the suppliers product (right side) of the form and change the price.
Save and when back to the purchase line the unit price is correctly updated.

What doesn't work is to open the product (left side), select supplier and change the price.
Save but when back to the purchase line the unit price is not updated. 

If you go into the product from any means you wish, the price indeed was not updated.

Both means to get to the suppliers price should update accordingly.
Date User Action Args
2019-03-17 13:43:42cedsetstatus: chatting -> resolved
messages: + msg47696
2019-01-24 18:18:21cedsetstatus: need-eg -> chatting
component: - purchase
messages: + msg46230
2019-01-24 17:38:16risto3setmessages: + msg46229
2019-01-24 17:28:00cedsetmessages: + msg46228
2019-01-24 17:15:04risto3setfiles: + Screenshot_2019-01-24.png
2019-01-24 17:04:11risto3setmessages: + msg46226
2019-01-24 16:21:26cedsetmessages: + msg46224
2019-01-24 15:54:12risto3setmessages: + msg46220
2019-01-24 11:34:36cedsetstatus: unread -> need-eg
nosy: + ced
messages: + msg46212
2019-01-24 11:26:08cedsettype: behavior

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