Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
9451 Widoki

This is my example: - BOM product: Bicycle - 2 wheels - 1 frame

Both wheels and frame are form same supplier. I ma MO and start scheduler. I get 1 purchase order for the wheels and 1 purchase order for the frame for the same supplier on the same order and delivery date.

Why does openerp not make 1 purchase order if supplier is the same and delivery times are the same?

I know that you can merge then but that is another extra step.

I can't explain it?

Awatar
Odrzuć

I have the same query too. Wondering if there is any way to streamline this.

You can select both purchase order and merge them if i'm not mistaking by clicking the more options in the tree view

Najlepsza odpowiedź
class procurement_order(osv.osv):
_inherit = 'procurement.order'
def create_procurement_purchase_order(self, cr, uid, procurement, po_vals, line_vals, context=None):
    po_vals.update({'order_line': [(0,0,line_vals)]})
    obj_po = self.pool.get('purchase.order')
    order_id = obj_po.search(cr,uid,[('partner_id','=',po_vals['partner_id']),('origin','=',po_vals['origin'])],context=context)
    if order_id:
        old_po = order_id[0]
        obj_po.write(cr, uid, [old_po], {'order_line': [(0,0,line_vals)]},context=context)
        return old_po
    else:
        return obj_po.create(cr, uid, po_vals, context=context)
Awatar
Odrzuć

I am not a programmer, so I don't understand your answer. Could you, or someone else, give an answer for a non programmer?

Najlepsza odpowiedź

Hello Endian,

It will auto merge in odoo v8, this may help you http://tidyway.blogspot.in/2014/12/single-purchase-quotation-from-multiple.html

Thanks

Rohan Nayani(www.tidyway.in)

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
wrz 22
1638
0
cze 15
4232
1
mar 15
5265
0
mar 15
4070
2
mar 15
7700