I’m working on purchase_requisition module. Currently, users must add items one by one, selecting the product, entering the quantity, and saving before moving to the next line. When a requisition contains dozens of items, this results in a high number of clicks and a slower workflow.
I want to make purchase lines entry faster, user should be able to select multiple product in bulk and then supplier should be selected once for the products sharing the same supplier.
Is there an existing, standard Tryton pattern or module (perhaps using a specific widget or wizard type) designed for fast, matrix-style data entry?
When we are creating the purchase order from purchase requests, it asks for the supplier one by one. I don’t need that UX. For the product sharing same vendor there should be an option to select them all and select the vendor for all of them only once.
So it is not about purchase requisition.
It is important to use the proper term otherwise we will not be able to understand each other.
This is because a supplier has not been defined on the product form.
It is better to setup the proper supplier once on the product form than set it each time you have a purchase request.
So, what is causing problem for me is that, I have to search from a long list of products again and again. I want to search them all once, and then quantities of items can be set in the later step.
There is no standard. But there are two things you can do without touching the core:
Make the requisition lines tree view editable (editable="bottom" on the tree view). You stay in the list: type the product code or name, Tab, quantity, Enter, next line. No dialog per line. This alone removes most of the clicks.
If you really want “select many products at once, quantities later”: a small custom wizard with a Many2Many to product.product does it. The search dialog already supports multi-selection, so you search once, pick all products, and the wizard creates one requisition line per product. Then you fill the quantities in the editable list.
For the supplier part, as @ced said: define product suppliers on the product form. The create purchase wizard then groups requests per supplier and never asks.
In my previous message I wrote editable="bottom", but that syntax is from old series. Since 5.6 the attribute is a boolean, so on current series it must be editable="1". That alone may be why your code did not work.