Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
6582 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
feb. 16
11167
0
okt. 15
3710
1
mrt. 15
4553
0
mrt. 15
4270
3
feb. 16
6330