Skip to Content
Menu
This question has been flagged
1996 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()
Avatar
Discard
Related Posts Replies Views Activity
1
Aug 23
12549
1
Aug 23
11058
1
Jul 23
7228
4
Apr 23
8677
2
Feb 23
17601