Odoo Help

0

0
2 Answers
1
Avatar

Ray Carnes

--Ray Carnes--
2449
| 5 2 8
Highland, Stati Uniti d'America
--Ray Carnes--

Business Analyst - Custom Projects

https://www.linkedin.com/in/raycarnes

Ray Carnes
22/02/19, 14:51

You need to import the logger:

import logging
_logger = logging.getLogger(__name__)


Then something like this:

        # add logging
        _logger.info('------------------------')
        stock_moves = self.mapped('move_lines')
        for stock_move in stock_moves:
            _logger.info(stock_move.product_id.name)
        _logger.info('------------------------')
        #

I added these lines to the start of the action_assign method of the stock.picking model, which runs when you click CHECK AVAILABILITY.


Output for Chic/OUT/00002 using the demo database:




Ask a Question
Tags
Keep Informed
1 follower(s)
About This Community

This platform 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.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now