Odoo Help


2 Answers

Jignesh Mehta India

--Jignesh Mehta--
| 7 6 10
Surat, India
--Jignesh Mehta--
General Summary :-
- Odoo (Formerly OpenERP) Technical & Functional Expert.
- Worked as Project lead on Jewellery Manufacturing ERP.
- Having 3+ years of strong experience in odoo module development.
- Work for 3+ odoo customization to international & national clients.

Module Developments :-
- Develop Jewellery Manufacturing ERP from Scratch.
- Work in Several Modules like CRM, Sales, Purchase, Account, Inventory HR, Payroll, Website, etc.
- Work in Odoo themes which is Business and E-commerce.

Report Development :-
- Develop several Qweb and Excel Reports.

Code Migration :-
- Migrate code from Odoo9.0 to Odoo12.0 of Jewellery Manufacturing ERP.
Jignesh Mehta India
2/13/16, 6:25 AM

Hello EM,

Please try below code:-


def default_get(self, fields):

    res = super(stock_transfer_details, self).default_get(fields)

    picking_obj = self.env['stock.picking'].browse(self._context.get('active_id'))    

     active_model = self._context.get('active_model')

Hope this will helps you.


Priyesh Solanki United States
2/12/16, 6:33 PM
def default_get(self, fields):
    if self._context is None: self._context = {}
    res = super(stock_transfer_details, self).default_get(fields)
    picking_ids = self._context.get('active_ids', [])
    active_model = self._context.get('active_model')

Please try this one and let me know.
1 Comment
Priyesh Solanki United States
2/13/16, 10:57 AM

I missed out 'self' in definition of function, thanks to Jignesh!

Ask a Question
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.

Odoo Training Center

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

Test it now