feat: pre-creation confirmation step with inline duplicate warnings

Before writing any expense records the bot now posts a numbered table
of parsed vendor/amount/date for every receipt, with duplicate entries
flagged inline. User replies 'confirm' (skips dups) or 'confirm, keep
all'. This catches OCR amount misreads before they land in Odoo.

Also removes the separate awaiting_dup_approval step; duplicate review
is now part of the single confirmation table.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Carlos Garcia
2026-05-16 16:54:25 -04:00
parent 12576ead1b
commit af1d27be89
2 changed files with 57 additions and 50 deletions

View File

@@ -273,6 +273,8 @@ class DiscussChannel(models.Model):
'suspected duplicate',
'skip duplicates',
'keep all',
'please review',
'reply "confirm"',
)
prev_was_bot_question = False
for msg in messages: