Odoo Help


Is it possible to reuse all variables defined in the super() method?

Pascal Tremblay
on 2/9/16, 12:10 PM 1,057 views

Hello all,

In my custom module, I'm rewriting the create_from_ui method of pos.order class.

I would want to reuse the same variables already defined in the original create_from_ui method.

Here is my code in my custom module :

def create_from_ui(self, cr, uid, orders, context=None):
        _logger.error("create_from_ui NEW BEGIN")
        res =   super(pos_order, self).create_from_ui(cr, uid, orders, context=context)           
        #I want to use SOME VARIABLES OF THE ORIGINAL create_from_ui METHOD HERE...
        _logger.error("create_from_ui END BEGIN")
        return res

Do you know how to manage it?

So, like I thought, sometimes we have to rewrite a part of the code of the original method in the new one. To rebuild some variables.

Pascal Tremblay
on 2/9/16, 2:35 PM

Ray Carnes

--Ray Carnes--
| 9 7 9
Keyport, United States
--Ray Carnes--

Senior ERP Analyst

OpenERP 6.1, 7.0; Odoo 8.0, 9.0, 10.0 and 11.0.

Completed Odoo Functional and Technical Training.

Functional Areas:

  • CRM/Sales

  • Inventory

  • Manufacturing

  • Accounting

  • Purchasing

Major Skills:

  • Business Process Reengineering

  • Efficiency Consulting

  • User Needs and GAP Analysis;

  • Functional and Technical Design;

  • Prototyping and Proof of Concepts;

  • Requirements Specifications;

  • Agile Implementation;

  • Data Migration;

  • Configuration & Customization (UI and code);

  • Integration - Odoo and non Odoo Applications and Services;

  • Training and Knowledge Transfer;

  • Go Live Support;

  • Helpdesk;

  • Version Upgrades and Migration.

  • Accounting Expert.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

I am a skilled Communicator and I only take the serious things seriously!

Ray Carnes
On 2/9/16, 9:35 PM

Only those returned via 'res'.

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

Question tools

1 follower(s)


Asked: 2/9/16, 12:10 PM
Seen: 1057 times
Last updated: 2/9/16, 9:35 PM