when adding purchase order line, propose products supplied by the current purchase order partner first
The supplier info lines addition in OpenERP trunk was very smart enhancement and I should say that we did almost exactly that for a customer and then I just discovered the feature was added while thinking about publishing some module...
So now that we may know which are the suppliers of a given product, then why not use it to help entering purchase order lines: indeed: whenever you filled those supplier infos lines in the products, then in a new PO, once you selected a supplier it's likely you'll buy him a product he is the supplier of, so why not present first so products in the popup? We could also possibly use a special color for them.
Isn't it easy to add this feature?
Blueprint information
- Status:
- Started
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Discussion
- Series goal:
- None
- Implementation:
- Good progress
- Milestone target:
- None
- Started by
- Raphaël Valyi - http://www.akretion.com
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
I have did some work on this blueprint. can you apply this patch in product/product.py ?
=== modified file 'product/
--- product/product.py 2009-07-27 09:10:20 +0000
+++ product/product.py 2009-08-11 13:30:30 +0000
@@ -544,6 +544,26 @@
else:
return super(product_
+
+ def read(self, cr, user, ids, fields=None, context=None, load='_
+ res = super(product_
+ result = []
+ TODO = []
+ supplier_product = []
+ if context.
+ cr.execute("select product_id from product_
+ supplierinfo = cr.fetchall()
+ for supplierinfo_
+ if supplierinfo_
+ supplier_
+ for product in res:
+ if product['id'] in supplier_product:
+ result.
+ else:
+ TODO.append(
+ res = result + TODO
+ return res
+
product_product()
class product_
note from Raphaël Valyi:
-> Hello, I promise to check this as soon as possible, this is great news indeed.