تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4308 أدوات العرض

I have my Companies named like this:

CO A

CO B

CO C

CO D


I would like the Chart  of Accounts, and the Financial Statements, to show a prefix for each account (since I have the same Chart in each Company).


For "101000 Current Assets" I would want:

A 101000

B 101000

C 101000

D 101000


How can I setup Odoo to do this automatically?

الصورة الرمزية
إهمال
أفضل إجابة

One way is with an Automated Action like this:




Code:

for record in records:
if record.company_id > 1 and company_id.name[3] not in record.code:
record['code'] = record.company_id.name[3] + record.code


Note: Don't put spaces in Account Codes - it prevents you from using the CODE to import.    Also, in this example, the prefix is NOT added for the first Company (because it was considered the parent Company)

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
3
يونيو 25
3338
0
مايو 24
2145
1
مارس 24
2041
1
فبراير 24
2177
1
يناير 24
1927