Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3971 Lượt xem

Greetings,

I would like to change the default structure for GL entries that get generated by Sales Invoices. Currently, Sales Invoice posts the following entries into the GL: Dr(AccountA) Eur 100, Dr(AccountB) Eur 200, Cr(AccountC) Eur 300

whereas I would like to change it to Dr(AccountA1) Eur 50, Dr(AccountA2) Eur 50, Dr(AccountB) Eur 200, Cr(AccountC) Eur 300

Please suggest how this type of change can be made.

Thanks. Petre

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

You can override 'finalize_invoice_move_lines(cr, uid, invoice, move_lines)' that is a hook method to be overridden in additional modules to verify and possibly alter the move lines to be created by an invoice, for special cases.

You can find this function in account module.

Thanks,

Ảnh đại diện
Huỷ bỏ
Tác giả

Thanks filsys for your answer.