Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ

how to Manually pass the accounting date for journal entries for old date but upcoming sequence is year 2024. and got this error

account_move = self.env['account.move'].create({


                'journal_id': journal.id ,

                'ref': _("Stock Valuation Adjustment for %s") % product_id.name,

                 })


                line_ids = [

                (0, 0, {

                    'move_id': account_move.id ,

                    'account_id': credit_account.id ,

                    'debit': 0.0,

                    'credit': value,

                    'name': _("Stock Valuation Credit for %s") % product.name,

                    'product_id': product.id ,

                    'quantity': quantity,

                }),

                (0, 0, {

                    'move_id': account_move.id ,

                    'account_id': debit_account.id ,

                    'debit': value,

                    'credit': 0.0,

                    'name': _("Stock Valuation Debit for %s") % product.name,

                    'product_id': product.id ,

                    'quantity': quantity,

                }),

                ]

                account_move.sudo().write({'line_ids': line_ids})

                account_move.action_post()


                create_date_obj =2023-12-31

               

               account_move.write({'date': create_date_obj})



Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 8 25
838
1
thg 7 25
849
0
thg 5 25
923
2
thg 4 25
1336
1
thg 4 25
2004