El 07/02/18 a les 17:51, Cédric Krier ha escrit:
> On 2018-02-07 17:27, Sergi Almacellas Abellana wrote:
>> El 07/02/18 a les 16:43, Cédric Krier ha escrit:
>>> On 2018-02-07 16:26, Sergi Almacellas Abellana wrote:
>>>> Hi,
>>>>
>>>> The account_deposit module defines a new kind of account (Deposit
>>>> account) but there is no deposit account on the Spanish CoA. After a
>>>> little bit of digging i found that the Spanish CoA includes deposit
>>>> accounts for customers (4380) and suppliers (4070), so this accounts
>>>> should be marked as deposit. This requires to add the account_deposit as
>>>> dependency of the account_es module, but not sure if this is the best
>>>> way as this module also adds new functionaly on party and invoice which
>>>> is not relevant to people not using the deposit functionaly.
>>>
>>> You may put those account inside a extra depend module.
>>
>> The main issue here is that this account should be included on the
>> balance sheet so probably the best is to use the deposit kind when the
>> account_deposit module is installed and the other type when not installed.
>
> I do not think it is possible to do that.
I've achieved it by adding the the following code at the end of the xml
definition:
<data depends="account_deposit">
<record id="pgc_4070_normal" model="account.account.template"
update="1">
<field name="kind">deposit</field>
<field name="party_required" eval="True"/>
</record>
<record id="pgc_4380_normal" model="account.account.template"
update="1">
<field name="kind">deposit</field>
<field name="party_required" eval="True"/>
</record>
</data>
>
>>> But usually, you have 1 account deposit per party so you create them and
>>> they do not come from the standard chart.
>>
>> But the code groups by line party [1], so it's possible to have multiple
>> parties on the same account (as the party required flag should be set
>> for this accounts). Furthermore, I don't see how each party gets it's
>> deposit account assigned. Am I missing something?
>
> Indeed deposit account must have party checked.
>
Then it's possible to define a single account with multiple parties. So
for me it makes sense to mark the accounts on deposit on the account chart.