Tryton - Issues

 

Issue9017

Title Template with Product Suppliers can't be duplicated
Priority bug Status chatting
Superseder Nosy List carlos.galvez, ced, pokoli, resteve, reviewbot
Type behavior Components purchase
Assigned To Keywords patch, review
Reviews 278491002
View: 278491002

Created on 2020-01-29.13:50:48 by carlos.galvez, last changed by ced.

Files
File name Uploaded Type Edit Remove
issue9017.diff carlos.galvez, 2020-01-29.13:50:47 text/plain
Messages
msg55161 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2020-01-31.12:42:01
> I agree with the first part, but IHMO we can't be sure that duplicated suppliers are really a suppliers for the duplicated product.

You can say that for any data of the product. If you do not want to duplicate, just do not duplicate.
msg55160 (view) Author: [hidden] (carlos.galvez) Date: 2020-01-31.12:37:01
I agree with the first part, but IHMO we can't be sure that duplicated suppliers are really a suppliers for the duplicated product. In both cases we force the user to maintain the relationships, in the first case perhaps by missing information of which the user is already aware because he knows that he is creating a new product, in the second case perhaps due to incorrect information.
msg55159 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2020-01-31.11:57:10
For me, we should find a solution that keep the duplication of suppliers.
It should probably be done in two pass, a first that duplicate without the suppliers and second that duplicate the suppliers with the template and product updated.
New review278491002 at https://codereview.tryton.org/278491002/#ps282861002
msg55102 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2020-01-29.13:53:52
I'm wondering if it won't be better to update the product suppliers to match the newly created product. 

BTW, if you want to propose a patch please follow: 

https://www.tryton.org/develop
msg55100 (view) Author: [hidden] (carlos.galvez) Date: 2020-01-29.13:50:47
Templates with Product Suppliers can't be duplicated.

When you try to do it this message is raised:
The value for field "Variant" in "Product Supplier" is not valid according to its domain.

e.g:
http://demo5.4.tryton.org/#demo5.4/model/product.template/1;name=%22Products%22&views=%5B272%2C271%5D

Maybe in the purchase module, the 'copy' method of the models product and the template  should set the value of product_suppliers to None.
History
Date User Action Args
2020-01-31 12:42:01cedsetmessages: + msg55161
2020-01-31 12:37:01carlos.galvezsetmessages: + msg55160
2020-01-31 11:57:10cedsetnosy: + ced
messages: + msg55159
2020-01-29 16:52:09reviewbotsetnosy: + reviewbot
messages: + msg55105
2020-01-29 16:52:08reviewbotsetreviews: 278491002
keyword: + review
2020-01-29 14:17:00restevesetnosy: + resteve
2020-01-29 13:53:52pokolisetstatus: unread -> chatting
nosy: + pokoli
messages: + msg55102
2020-01-29 13:50:48carlos.galvezcreate

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