Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Comments on delivery orders

By
Roberto Barreiro
on 5/7/14, 6:47 AM 1,549 views

Is there any way to use comments on delivery orders like it can be done at quotations and invoices? Thanks in advice.

1
shashank verma
On 5/7/14, 7:12 AM

Hello

OpenERP version 6.1 ->

go to sale-sale.py->

def _prepare_order_picking(self, cr, uid, order, context=None):
    import ipdb;ipdb.set_trace()
    pick_name = self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.out')
    return {
        'name': pick_name,
        'origin': order.name,
        'date': order.date_order,
        'type': 'out',
        'state': 'auto',
        'move_type': order.picking_policy,
        'sale_id': order.id,
        'address_id': order.partner_shipping_id.id,
        'note': order.note,
        'invoice_state': (order.order_policy=='picking' and '2binvoiced') or 'none',
        'company_id': order.company_id.id,
    }

############## Above code is general format how your data dynamically passes from sale order to your delivery order after confirming sale order. Now you can add your custom field here and your note value will be directly passes to stock.picking(delivery order form)

Example

class sale_order()

columns={'custom_note':field.text(My note)}

def _prepare_order_picking(self, cr, uid, order, context=None):
    import ipdb;ipdb.set_trace()
    pick_name = self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.out')
    return {
        'name': pick_name,
        'origin': order.name,
        'date': order.date_order,
        'type': 'out',
        'state': 'auto',
        'move_type': order.picking_policy,
        'sale_id': order.id,
        'address_id': order.partner_shipping_id.id,
        'note': order.note,
        'invoice_state': (order.order_policy=='picking' and '2binvoiced') or 'none',
        'company_id': order.company_id.id,
        'custom_note_pick':order.custom_note #your comment dynamically passes to delivery order
    }

sale_order()


class stock_picking()

columns={'custom_note_pick':field.text(My note)}

stock_picking()

What i want to do, is that the notes I put at quotations, appears also at delivery notes. I dont know how to do what you have explained. Thanks for your answer, I'm sorry for my ignorance.

Roberto Barreiro
on 5/7/14, 7:51 AM

i have modified my above reply

shashank verma
on 5/7/14, 10:12 AM

I am trying to explain you in technical way because when user require any custom stuffs then we need to change the script .

shashank verma
on 5/7/14, 10:49 AM

I'm very pleased with you, thank you for take your time answering me with this great example. I'm using V7 but i will try to follow your answer.

Roberto Barreiro
on 5/7/14, 11:49 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/7/14, 6:47 AM
Seen: 1549 times
Last updated: 3/16/15, 8:10 AM