When I export the general ledger in XLSX format, the currency name does not appear in the Excel file, even though we are using multiple currencies.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
Hii,
make a custom model
File: account_general_ledger_currency_patch.p
from odoo import models class GeneralLedgerCurrencyPatch (models.AbstractModel): _inherit = 'account.general.ledger.report' def _get_columns_name ( self, options ): columns = super ()._get_columns_name(options) columns.append({ 'name' : 'Currency' }) # Add column title return columns def _get_lines ( self, options, line_id= None ): lines = super ()._get_lines(options, line_id) for line in lines: if 'columns' in line and line.get( 'level' ) == 2 : # Line is a move line record = line.get( 'record' , None ) if record and hasattr (record, 'currency_id' ) and record.currency_id: currency = record.currency_id.name else : currency = '' line[ 'columns' ].append({ 'name' : currency}) return lines
Register it in your module
__init__.py
from . import account_general_ledger_currency_patch
__manifest__.py
Make sure it depends on account_reports :
'depends' : [ 'account_reports' ],
i hope it is use full
This custom code is not working for me, since account.general.ledger.report doesn't exist in Odoo 17. I tried using account.general.ledger.report.handler, but it's still not working.
In default Odoo, The currency name is not included in the Excel file when exporting the General Ledger report, Even though we are using multiple currencies.
Is there any solution for this?
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
0
thg 6 25
|
8 | ||
|
1
thg 4 25
|
3383 | ||
|
1
thg 4 25
|
916 | ||
|
2
thg 12 20
|
4432 | ||
|
0
thg 4 23
|
1795 |