Odoo Help

1

0
1 Jawaban
3
Avatar

Akhil P Sivan India

--Akhil P Sivan--

4174
| 6 4 9
Kochi, India
--Akhil P Sivan--

Odoo Developer

email-id : akhilpsivan01@gmail.com

Akhil P Sivan India
05/02/17 05.24

Hi,

I think you may use a compute Many2one field.

For eg:

customer_of_division_id = fields.Many2one(compute='_get_division_id', comodel_name='res.partner', string='Customer of the division', store=True)
 
@api.depends('sale_id','partner_id')
def _get_division_id(self):
    if self.sale_id:
        self.customer_of_division_id = self.sale_id.customer_of_division_id.id
    elif self.partner_id:
        self.customer_of_division_id = self.partner_id.customer_of_division_id.id
3 Komentar
La Page PT, Pascal Tremblay Kanada
05/02/17 09.20

You are really a beast! I try this and I come back soon! Big thanks (once again)!

La Page PT, Pascal Tremblay Kanada
05/02/17 11.19

It works perfectly. Your help is really appreciated here!

Akhil P Sivan India
05/02/17 11.22

thank you :)

Mengajukan pertanyaan
Writer
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