Skip to content

Link Glory transactions to POS payments using payment UUIDs and add transaction state/tracking#1

Closed
Borruso wants to merge 1 commit into16.0from
codex/improve-transaction-saving-for-glory-cash-module
Closed

Link Glory transactions to POS payments using payment UUIDs and add transaction state/tracking#1
Borruso wants to merge 1 commit into16.0from
codex/improve-transaction-saving-for-glory-cash-module

Conversation

@Borruso
Copy link
Copy Markdown
Owner

@Borruso Borruso commented Mar 30, 2026

Motivation

  • Introduce durable linkage between Glory machine transactions and POS payments using the payment UUID to reliably associate transactions with orders and to avoid duplicate records.
  • Add operational metadata and state tracking to glory.transaction to better surface processing status and errors.
  • Surface the new fields in views and ensure the frontend flows include the payment UUID when recording Glory interactions.

Description

  • Added a SQL unique constraint on glory.transaction.pos_payment_uuid and added fields state, pos_payment_uuid, attempt_count, last_error, and processed_at to glory.transaction for lifecycle and error tracking, and adjusted the form/tree/search views to display and filter on these fields.
  • Extended pos.session.generate_glory_transaction and try_write_glory_transaction to accept and persist pos_payment_uuid, initialize attempt_count/processed_at, and set state automatically for payment/refund/aborted operations.
  • Updated pos.order.create_from_ui to map incoming UI order payloads and link existing glory.transaction records to orders using the glory_payment_uuid embedded in statement lines before falling back to the previous matching logic.
  • Updated action_set_glory_on_order to attempt to link payments to transactions by pos_payment_uuid when marking orders.
  • Frontend changes: store and propagate a glory_payment_uuid on paymentlines by extending the Payment model to persist the UUID and by setting it when a Glory paymentline is created; ensure all RPC calls to try_write_glory_transaction include the payment UUID; adjusted paymentline status flow when sending requests.
  • Fixed a view field reference (diff_stacker_bill_50_00) that was previously pointing to the wrong field name.

Testing

  • Installed the module and performed a full module update on a local Odoo instance to validate model schema changes and view updates, which completed without SQL or view parsing errors.
  • Exercised the POS flow manually with Glory paymentlines to verify that glory_payment_uuid is attached, propagated to the server RPCs, and that transactions are linked to pos.order records; these manual checks succeeded.
  • Ran Python linting and JavaScript lint checks on the modified files with no new errors reported.

Codex Task

@Borruso Borruso closed this Mar 30, 2026
@Borruso Borruso deleted the codex/improve-transaction-saving-for-glory-cash-module branch March 30, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant