Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
7734 Weergaven

I have a sales order form which contains a custom delivery date field.

Now I want to pass the value from delivery date field in sales order to the commitment date field in delivery order (stock.picking.out).

Did we make two columns in both stock.picking and stock.picking.out?

And also how can I take the delivery date field value from sales order during the automatic creation of delivery order(at the click of confirm order button).

I am using v7. Thanks in advance

Avatar
Annuleer
Beste antwoord

There is a method named _prepare_order_picking in sale.order model in sale_stock module that generates and returns a dictionary to creates delivery order.
You have to override that method and modify the dictionary as per your need.

class sale_order(osv.Model):
    _inherit = 'sale.order'

    def _prepare_order_picking(self, cr, uid, order, context=None):
        vals = super(sale_order, self)._prepare_order_picking(cr, uid, order, context=context)
        vals.update({'field_name': your_value})
        return vals

I guess this will solve your question.

Avatar
Annuleer
Auteur

thank you very much sudhir. its working.. :)

How is this done on v8? I tried this but doesn't work: def _prepare_order_line_procurement(self, cr, uid, order, line, group_id=False, context=None): res=super(sale_order, self)._prepare_order_line_procurement(cr, uid, order, line, group_id=False, context=context) return { 'client_order_ref': order.client_order_ref, }

Gerelateerde posts Antwoorden Weergaven Activiteit
3
feb. 25
3540
0
mei 24
46
1
apr. 24
3348
4
sep. 23
4830
2
sep. 23
7044