I have parsed data in the form of panda's dataframe or csv files. How would I proceed with implementing a custom module that creates a bank statement and passes my data to its bank statement lines? I don't want to use the existing import wizard since I'd like to pass the method to a cron job to be performed in the background
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
- Dự án
- MRP
Câu hỏi này đã bị gắn cờ
1
Trả lời
2936
Lượt xem
So i managed to pass my data to an existing bank statement with this:
length = len(df.index)
i = 0
while i < length:
df['postingDate'][i] = datetime.strptime(df['postingDate'][i], "%d/%m/%Y").strftime('%m/%d/%Y')
vals = {
'name': df['description'][i],
'date': df['postingDate'][i],
'amount': df['amount'][i],
'user_id': self.user_id.id,
'statement_id': '1',
}
self.env['account.bank.statement.line'].create(vals)
i += 1
Question regarding how to create a bank statement through custom code still remains, any help with that?
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ý