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

Want to show the order id in logfile.

By
nahian
on 2/22/16, 4:01 AM 201 views

I am just fresh in python so I need help, need suggestion.

I'm trying to pool the order line from sale.order.line and want to show order id in log file.

this is the way I tried,here is my code:

class SOL(models.Model):
    _inherit = 'sale.order.line'

    def _get_sale_o_line(self, cr, uid, ids, context=None):
        so_pool = self.pool.get('sale.order.line')
        for so_obj in so_pool.search(cr, uid, ids,context=None):
            logging.debug('Order Name: %s' so_obj.order_id)
obj=SOL()
obj._get_sale_o_line()

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: 2/22/16, 4:01 AM
Seen: 201 times
Last updated: 2/22/16, 5:00 AM