Odoo Help


2 Answers

Cybrosys Techno Solutions Pvt.Ltd India

--Cybrosys Techno Solutions Pvt.Ltd--
Cybrosys Techno Solutions Pvt.Ltd
| 7 6 10
Calicut, India
--Cybrosys Techno Solutions Pvt.Ltd--

Cybrosys Technologies is a private limited ISO certified company in Technology and Software Engineering sector. We serve as one of the best and trusted Odoo official partner, providing ultimate Customization and Implementation services in Odoo ERP. A frequent contributor to Odoo Apps, our customized free apps are downloaded by more than one lakh users. Most of our apps augment the potentialities of Odoo and are trending in the Odoo app store.

Cybrosys keeps privilege to be one among the finest Odoo Official Partners with 200+ free apps contribution towards the Odoo community. Cybrosys also stands number one in Odoo-social Media Integration empowering every kind of business solutions.

We are also enriched with highly skilled UI/UX technical experts for Developing, Implementing and Designing, thereby providing ultimate benefit to our customer base.

Today Cybrosys has reached par excellent in Odoo Implementation and allied services, proving its credibility and reliability. Our proven services are used by customers sprawling across 160+ countries including Middle East, African continents, UK, Germany, Spain, Thailand, Hong Kong, New Zealand, Australia, Malaysia, Singapore, Egypt etc.

We are rapidly expanding our base with robust quality management and business process re-engineering to meet the ultimate customer desire.

To know more about Cybrosys Technologies and our Odoo Apps, Kindly visit:

Cybrosys Technologies 

Odoo Apps 

And inbox us your queries to odoo@cybrosys.com

Cybrosys Techno Solutions Pvt.Ltd India
1/14/19, 3:37 AM


In the last line of python code, use the warehouse instead of self as you are iterating the self.

for rec in self:
warehouse = self.env['sale.order'].search([('name', '=', rec.origin)], limit=1).warehouse_id.id
if warehouse:
rec.warehouse_id = warehouse


Blagoj République de Macédoine
1/14/19, 5:17 AM

So I had a bad compute function. I would had never guessed that it is causing this issue. Thanks to Cybrosys Techno Solutions Pvt.Ltd  solution which pointed me to it, I did the following:

    def _get_warehouse(self):        
        for warehouse in self:           
            warehouse_id = self.env['sale.order'].search([('name', '=', warehouse.origin)], limit=1).warehouse_id.id           
            if warehouse_id:
                warehouse.warehouse_id = warehouse_id

Thank you so much

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