Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
6579 Tampilan

Hi everyone !

I have a request for a Odoo 8.0.

I want to create automatically an account when I create a partner. For exemple, if I create a partner named "Mr Smith", I want an account named "CSMITH" but I don't want to create manually each account.

For now, each partner I create have for account "110200".

Sorry if I'm not clear, but I'm originaly french.

Where I can configure that ?

Thanks for your help

Avatar
Buang
Jawaban Terbai

Hi Jfs,
To achieve the above i think you have to super the create function of the res.partner . After supering the create function you have to create a account from the code  for the partner and can assign the name of account as partners name.

Thank you

class ResPartner(models.Model):
_inherit = 'res.partner'

@api.model
def create(self, vals):
res= super(ResPartner, self).create(vals)
#write the code for creating the account and assign to partner
return res
Avatar
Buang
Jawaban Terbai

Odoo does automatically create customer/vendor accounts in the accounts payables/receivables accounting when you create customers or vendors. This is common behaviour of accounts receivables/payables accounting applications and the purpose is to avoid creating separate general ledger accounts for each customer/vendor. I do not know any possible use case which would make such requirement meaningful (except of banking business, but then you need a banking software and not an ERP software like Odoo).

But if you have sound accounting knowledge  and you know the reason for your requirement, then Niyas answer will help you.

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
2
Feb 16
11166
0
Okt 15
3709
1
Mar 15
4552
0
Mar 15
4270
3
Feb 16
6326