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

Hi,

I'm working in odoo13, need to generate multiple invoices from schedular. For this i added new schedular, once schedular starts execute i want to generate multiple invoice with multiple invoice lines. But its not working properly.

Here i added my code.

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

                                            'partner_id': partner.id,

                                            'type': 'out_invoice',

                                            'invoice_date': date.today(),

                                            'journal_id': 1, 

                                        })

self.env['account.move.line'].sudo().with_context(check_move_validity=False).create({

                                                            'partner_id': partner.id,

                                                            'name': products.name,

                                                            'product_id': products.id,

                                                            'move_id': account_move.id,

                                                            'account_id': account.id,

                                                            'journal_id': 1,

                                                            'quantity':  qty,

                                                            'price_unit':  price,

                                                            'product_uom_id': uoms.id,

                                                            'date': date.today(),

                                                            'tax_ids': [(6, 0, tax.ids)],

                                                        })


Its working in odoo12, but in odoo13 it's not working fine, even its not producing any error, does not shows tax details.

Can please anyone suggest me how to achieve this


Thanks

Ảnh đại diện
Huỷ bỏ

If you have any errros add it with the question

Dear selvi ,

goto Technical-->Scheduled Actions-->your scheduled action name

click on Run Manually button and check the odoo logs you will get some idea about that problem.

Thanks.

Tác giả

Thanks, for all your answers i got the solution.

HI selvi how did you solve this

Câu trả lời hay nhất

care to share how you solved the problem  selvi


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 10 23
41686
1
thg 10 23
3930
2
thg 2 23
4596
1
thg 12 22
4060
2
thg 3 22
5434