Request for Quotation to Many Suppliers

(Cédric Krier) #21

I think so. But I still think the wizard should warn about such situation.

(Maxime Richez) #22

Ok. So a warning when calling wizard on purchase_request with ‘quotation’ state, or it should be when we process the wizard and we had to search for existing lines with same request and supplier after the cartesian product?

What would be the warning message? 'Be careful, you already made a quotation with one of the selected requests !"?

(Cédric Krier) #23

I think we can simply rely on the state.

Yes with the rec_name of the request (and probably without the “Be careful” because there will already have the warning icon).

(Maxime Richez) #24

With this module, purchase_request module needs to get data from the best quotation (first line with state answered) to create a purchase (wizard). So i’m redefining _group_purchase_line_key and _group_purchase_key to get data from the quotation.

For each method _group, i need to search for existing quotations with state answered and getting data from the first result (sequence ordered).

So, is it better to define a new function field on the request that would be “best_quotation” or this kind of field is unnecessary and i keep checking for best quotation each time wizard create_purchase is launched ?

(Cédric Krier) #25

I do not think it is needed to have a Function field, the cache will not be so much useful.
But you could use a property that do not make a search but just a loop on the quotations and return the first valid.

(Maxime Richez) #26

New issue for a proposal