Odoo Help

3

3
1 Answer
3
Avatar

Muhammad Anees Saudi Arabia

--Muhammad Anees--

7115
| 7 3 8
Riyadh, Saudi Arabia
--Muhammad Anees--

Odoo, Dynamics AX and Web Developer.

Muhammad Anees Saudi Arabia
11/6/19, 9:29 AM

The requirement can be achieved by overriding create() and write() methods, or even field onchage() method.
But I have done it by Related field as following and it is working fine with me..

class TTAccountInvoiceLine(models.Model):
_inherit = 'account.invoice.line'
    shipment_id = fields.Many2one('purchase.shipment', string='Shipment', related='invoice_id.shipment_id', store=True)

 in account.invoice i have custom filed shipment_id. So related='invoice_id.shipment_id'.

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