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?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
Hello Moe,
Please find code in comment.
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
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)
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
Feb 24
|
5138 | ||
|
0
Oct 24
|
129 | ||
|
3
Mar 16
|
3539 | ||
|
0
Nov 16
|
2662 | ||
|
1
May 24
|
387 |