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

I am new to Odoo development. I would like to know can we create a POS order programmatically of specific product using Cron job

What I want to achieve is that I would like to create a POS ORDER of voucher remaining value so I know how much amount is used by the customer and how much is not consumed by the customer any suggestion will be helpful

Looking forward to hear from your side Thank you


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

Hi,

Please see the screen shot in the following link showing how to create pos orders from the scheduled action/cron job.

See:  https://ibb.co/M9LhnRb

You can replace the dummy values according to your logic

Thanks

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

values = {'company_id': env.user.company_id.id,

'partner_id': 14,

'session_id': 1,

'lines': [(0, 0, {

'name': "OL/0001",

'product_id': 1,

'price_unit': 70,

'qty': 2,

'tax_ids': [],

'price_subtotal': 70*2,

'price_subtotal_incl': 70*2,

})],

'amount_total': 70*2,

'amount_tax': 0,

'amount_paid': 0,

'amount_return': 0}

env['pos.order'].create(values)

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 12 22
3741
0
thg 12 20
50
0
thg 12 15
13471
2
thg 8 24
6774
1
thg 12 23
1712