Skip to Content
Menu
This question has been flagged

Hey,


I want to create an invoice and for that I need the account.account.id. But I just cant find the relation between these two models.


Does anybody know, what the relation between res.partner and account.account is?


I would appreciate your help very much.


Avatar
Discard
Best Answer

Hi,

There is two many2one fields with comodel as account.account inside the res.partner. The field names as of odoo12 is property_account_receivable_id and property_account_payable_id.


property_account_payable_id = fields.Many2one('account.account', company_dependent=True,
string="Account Payable", oldname="property_account_payable",
domain="[('internal_type', '=', 'payable'), ('deprecated', '=', False)]",
help="This account will be used instead of the default one as the payable account for the current partner",
required=True)
property_account_receivable_id = fields.Many2one('account.account', company_dependent=True,
string="Account Receivable", oldname="property_account_receivable",
domain="[('internal_type', '=', 'receivable'), ('deprecated', '=', False)]",
help="This account will be used instead of the default one as the receivable account for the current partner",
required=True)


Thanks

Avatar
Discard
Author Best Answer

Thanks for your help. I finally did it.

Avatar
Discard
Related Posts Replies Views Activity
0
Feb 16
3495
0
Jun 19
2172
0
Jun 19
2056
0
Apr 18
4616
1
Aug 15
149