Skip to Content
Menu
This question has been flagged

I have a field in the form view of the account.move model and I want to relate it to the sales.order model where I have a field and I want to fill it in the account.move. I am trying to add the domain for the field in the invoice but I can't find anything, does anyone knows how I can link these two?

Avatar
Discard
Best Answer

Hello Moe,

Please find code in comment.

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

Avatar
Discard

Please find below code it may help you to resolve this issue,

First added one field Many2one in account.move model relation with sale.order model

class AccountMove(models.Model):
_inherit = 'account.move'

sale_id = fields.Many2one('sale.order', string=Sale)

After Related field use in account move model same as a sale model field.

account_move_field = field.field_type(related=sale_id.sale_order_field)

Related Posts Replies Views Activity
2
Feb 24
5138
0
Oct 24
129
3
Mar 16
3539
0
Nov 16
2662
1
May 24
387