コンテンツへスキップ
メニュー
この質問にフラグが付けられました

Hello Odoo Community,

I'm developing a custom module in Odoo 17 and need invoice and credit note sequences to reset monthly. However, the sequences aren't resetting as expected. Here's a brief overview of the issue:

Problem

Even with use_date_range=True, the sequences do not reset monthly. Instead, a single date range is created for the entire year (2024-01-01 to 2024-12-31), and the sequence continues incrementing without resetting each month.

What I've Checked

  • Sequence Configuration: Confirmed use_date_range=True is set, and the prefixes include both year and month.
  • Database Records: The ir_sequence_date_range table shows a single range for the entire year instead of separate monthly ranges.
  • Context Handling: I'm passing ir_sequence_date=sequence_date in the context when generating sequences.

What I Need Help With

  1. Automatic Monthly Reset: How can I ensure sequences reset automatically every month?
  2. Custom Logic: Do I need custom logic to create monthly date ranges, or should Odoo handle this automatically with use_date_range=True?
  3. Best Practices: Are there any best practices or common pitfalls when working with date ranges and sequence resets in Odoo?

Any guidance or suggestions would be greatly appreciated. Thank you!



アバター
破棄
関連投稿 返信 ビュー 活動
0
1月 24
2849
0
9月 20
2596
0
9月 18
3230
1
2月 17
3331
0
8月 15
3299