If in product.line we have a new m2o field to purchase.product.supplier, I think we could obtain information different to show in reports:
* Internal company reports: use product field
* Supplier reports: use product_supplier field to obtain codes and name from supplier.
OK, I think we should change the logic of the patch.
We could add a new field "product supplier" on purchase line. If a value is set on this new field, the product is filled with the linked product if only one exist or limited by a domain.
I think it is cleaner design because it lets the user decide which kind of search he wants.
Well, I do have an observation (and a screenshot to demonstrate)
While typing the supplier code, the tips still display the non-supplier code/description. This is a bit disturbing in reality.
The initial example provided below with 1234 or S1234 is relatively simple, but to demonstrate I have supplier specific codes such as 6001A12 and 6001A14 for company codes 1ACU12 and 1ACU14 respectfully.
Typing '6001' should display all the supplier specific codes for '6001...'
not the company codes.
PM: the product database including suppliers codes is many thousands of entries.
Do I understand the patch correctly that the supplier-specific codes are searched in the 'OR' domain statement after the company-specific codes/description? (notwithstanding database sql optimisation)
If so, this can be quite brutal, perhaps some additional logic should be put in.
For example, a button to "limit" searches to supplier codes (probably on by default or at least configurable). That is, in absence of a supplier code for a quote, the supplier response typically includes their specific code allowing it to be added prior to confirming the PO for action.
Also, perhaps it would help to configure a minimal number of characters typed in prior to the tip search to avoid sluggish response (we suffered this already in oerp).
Perhaps this last one should have a new issue created.
jumping in here... this is great so far.
There is one more use case, when we enter an existing [paper] purchase order.
Frequently we recreating manual PO's from supplier delivery orders with a reference and attachment of the paper PO.
It should be possible to enter the supplier code to select the product as well.
This case happens quite frequently, notably when at the suppliers counter for various parts and materials for construction.
I like to explain what is wrong to add "name" in description line and not "rec
1- Create a purchase order
2- Create a new line.
3- Select a product. When select a product on change description line: "[code]
It's same a sale order, etc...
Scenario purchase request:
1- Select purchase request and do a purchase order.
2- Wizard generate a purchase order with selected purchase request.
Lines in purchase order, description value is "product name". No add "[code]
product name". It's missign code field (generated with rec_name)
IMHO, when generate purchase order manual or purchase request, two ways to
generate a purchase is different info about description line.
My first codereview was fix description line on purchase order lines: "[code]
product name" (rec_name)
Albert comment about description line from supplier product. I'm agree because
some companies don't have same product name that supplier product. An example:
* Code: 1234
* Name: Product A
My product suplier:
* Code: S1234
* Name: Supplier Product A
If you generate purchase request, description line is " Product A". When
you send your purchase order to supplier, don't know what product is "
Product A". It's better add in description line supplier product: "[S1234]
Supplier Product A"
I hope you now understand about need to fix about description line